Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Let XX and YY be discrete random variables and let S=X+YS = X+Y. We know that a good way to find the distribution of SS is to partition the event {S=s}\{ S = s\} according to values of XX. That is,

P(S=s) = all xP(X=x,Y=sx)P(S = s) ~ = ~ \sum_{\text{all }x} P(X = x, Y = s-x)

If XX and YY are independent, this becomes the discrete convolution formula:

P(S=s) = all xP(X=x)P(Y=sx)P(S = s) ~ = ~ \sum_{\text{all }x} P(X = x)P(Y = s-x)

This formula has a straightforward continuous analog. Let XX and YY be continuous random variables with joint density ff, and let S=X+YS = X+Y. Then the density of SS is given by

fS(s) = f(x,sx)dxf_S(s) ~ = ~ \int_{-\infty}^\infty f(x, s-x)dx

which becomes the convolution formula when XX and YY are independent:

fS(s) = fX(x)fY(sx)dxf_S(s) ~ = ~ \int_{-\infty}^\infty f_X(x)f_Y(s-x)dx

19.1.1Sum of Two IID Exponential Random Variables

Let XX and YY be i.i.d. exponential (λ)(\lambda) random variables and let S=X+YS = X+Y. For the sum to be s>0s > 0, neither XX nor YY can exceed ss. The convolution formula says that the density of SS is given by

fS(s) = 0sλeλxλeλ(sx)dx= λ2eλs0sdx= λ2seλs\begin{align*} f_S(s) ~ &= ~ \int_0^s \lambda e^{-\lambda x} \lambda e^{-\lambda(s-x)} dx \\ \\ &= ~ \lambda^2 e^{-\lambda s} \int_0^s dx \\ \\ &=~ \lambda^2 s e^{-\lambda s} \end{align*}

That’s the gamma (2,λ)(2, \lambda) 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 (0,1)(0, 1) Random Variables

Let S=U1+U2S = U_1 + U_2 where the UiU_i’s are i.i.d. uniform on (0,1)(0, 1). The gold stripes in the graph below show the events {Sds}\{ S \in ds \} for various values of SS.

<matplotlib.figure.Figure at 0x1a0d310b70>

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

<matplotlib.figure.Figure at 0x1a1562def0>

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.