Let and be discrete random variables and let . We know that a good way to find the distribution of is to partition the event according to values of . That is,
If and are independent, this becomes the discrete convolution formula:
This formula has a straightforward continuous analog. Let and be continuous random variables with joint density , and let . Then the density of is given by
which becomes the convolution formula when and are independent:
19.1.1Sum of Two IID Exponential Random Variables¶
Let and be i.i.d. exponential random variables and let . For the sum to be , neither nor can exceed . The convolution formula says that the density of is given by
That’s the gamma density, consistent with the claim made in the previous chapter about sums of independent gamma random variables.
Sometimes, the density of a sum can be found without the convolution formula.
19.1.2Sum of Two IID Uniform Random Variables¶
Let where the ’s are i.i.d. uniform on . The gold stripes in the graph below show the events for various values of .

The joint density surface is flat. So the shape of the density of depends only on the lengths of the stripes, which increase linearly between and and then decrease linearly between and . So the joint density of is triangular. The height of the triangle is 1 since the area of the triangle has to be 1.

At the other end of the difficulty scale, the integral in the convolution formula can sometimes be quite intractable. In the rest of the chapter we will develop a different way of identifying distributions of sums.