Sum of parabolic random variables

Suppose X is an RV with PDF given by:

fX(x)={34(1−x2)x∈[−1,1]0otherwise

Let Y be an independent copy of X. So fY=fX, but Y is independent of X.

Find the PDF of X+Y.

Solution

The graph of fX(w−x) matches the graph of fX(x) except (i) flipped in a vertical mirror, (ii) shifted by w to the left.

When w∈[−2,0], the integrand is nonzero only for x∈[−1,w+1]:

fX+Y(w)=(34)2∫−1w+1(1−(w−x)2)(1−x2)dx=916(w530−2w33−4w23+1615)

When w∈[0,+2], the integrand is nonzero only for x∈[w−1,+1]:

fX+Y(w)=(34)2∫w−1+1(1−(w−x)2)(1−x2)dx=916(−w530+2w33−4w23+1615)

Final result is:

fX+Y(w)={916(w530−2w33−4w23+1615)w∈[−2,0]916(−w530+2w33−4w23+1615)w∈[0,2]0otherwise

center

Discrete PMF formula for a sum

Verify the discrete formula for the PMF of a sum. (Apply the general formula for the PMF of g(X,Y).)

Vandermonde’s identity from the binomial sum rule

Show that this “Vandermonde identity” holds for positive integers n,m,ℓ:

∑j+k=ℓ(nj)(mk)=(n+mℓ)

Hint: The binomial sum rule is:

“Bin(n,p)+Bin(m,p)∼Bin(n+m,p)

Set p=q=1/2. Compute the PMF of the left side using convolution. Compute the PMF of the right side directly. Set these PMFs equal.

PDF of sums practice

Suppose X is an RV with density:

fX={2xx∈[0,1]0otherwise

Suppose Y is uniform on [0,1] and independent of X.

Find the PDF of X+Y. Sketch the graph of this PDF.

Solution

(1) Write the CDF of W=X+Y as a double integral:

FW(w)=P[X+Y≤w]=∬x+y≤wfX,Ydxdy

The joint density on the unit square x∈[0,1],y∈[0,1] is:

fX,Y≫≫fX⋅fY≫≫2x⋅1≫≫2x

There is positive density in the region x+y≤w only for x≤w (otherwise y<0).

  • When w∈[0,1], there is positive density in the region (only) when y≤w−x.
  • When w∈[1,2], there is positive density in the region whenever y≤1.

(2) Evaluate FW(w) for w∈[0,1]:

Here x∈[0,w] and w−x≤1, so y∈[0,w−x].

FW(w)=∫0w∫0w−x2xdydx≫≫∫0w2x(w−x)dx≫≫[wx2−2x33]0w≫≫w3−2w33≫≫w33

Differentiate:

fW(w)=ddww33≫≫w2

(3) Evaluate FW(w) for w∈[1,2]:

Now x ranges over [0,1]. Split by whether the y-bound is 1 or w−x:

  • x∈[0,w−1]: w−x≥1, so y∈[0,1]
  • x∈[w−1,1]: w−x<1, so y∈[0,w−x]
FW(w)=∫0w−1∫012xdydx+∫w−11∫0w−x2xdydx≫≫∫0w−12xdx+∫w−112x(w−x)dx≫≫(w−1)2+[wx2−2x33]w−11≫≫(w−1)2+(w−23)−(w(w−1)2−2(w−1)33)≫≫−13x3+w2−13

(4) Differentiate for the final PDF:

fW(w)=ddw(−13x3+w2−13)≫≫−w2+2w

Therefore:

fX+Y(w)={w2w∈[0,1]−w2+2ww∈[1,2]0otherwise

Convolution practice

Suppose X is an RV with density:

fX={2xx∈[0,1]0otherwise

Suppose Y is uniform on [0,1] and independent of X.

Find the PDF of X+Y. Sketch the graph of this PDF.

Solution

(1) Set up the convolution integral:

fX+Y(w)=∫−∞+∞fX(w−y)fY(y)dy

Since fY(y)=1 on [0,1], this reduces to ∫01fX(w−y)dy. The integrand fX(w−y)=2(w−y) is nonzero when w−y∈[0,1], i.e. y∈[w−1,w]. Intersecting with [0,1] gives the limits of integration.


(2) Evaluate for w∈[0,1]:

Integration region: y∈[0,w].

fX+Y(w)=∫0w2(w−y)dy≫≫[2wy−y2]0w≫≫2w2−w2≫≫w2

(3) Evaluate for w∈[1,2]:

Integration region: y∈[w−1,1].

fX+Y(w)=∫w−112(w−y)dy≫≫[2wy−y2]w−11≫≫(2w−1)−(2w(w−1)−(w−1)2)≫≫2w−1−(w2−1)≫≫−w2+2w

(4) Write the final piecewise PDF:

fX+Y(w)={w2w∈[0,1]−w2+2ww∈[1,2]0otherwise

Exp plus Exp equals Erlang - Without Convolution

Let us verify this formula by direct calculation:

“Exp(λ)+Exp(λ)∼Erlang(2,λ)”

Solution

Let X,Y∼Exp(λ) be independent RVs, and let W=X+Y.

Therefore:

fX,Y(x,y)=λe−λx⋅λe−λy=λ2e−λ(x+y)x≥0,y≥0

(1) Write the CDF as a double integral over the region x≥0,y≥0,x+y≤w:

For w≥0, the region is x∈[0,w], y∈[0,w−x].

FW(w)=∫0w∫0w−xλ2e−λ(x+y)dydx

(2) Evaluate the inner integral:

∫0w−xλ2e−λxe−λydy≫≫λ2e−λx[−1λe−λy]0w−x≫≫λe−λx(1−e−λ(w−x))≫≫λ(e−λx−e−λw)

(3) Evaluate the outer integral:

FW(w)=λ∫0w(e−λx−e−λw)dx≫≫λ[−1λe−λx−xe−λw]0w≫≫λ[(−1λe−λw−we−λw)−(−1λ)]≫≫1−e−λw−λwe−λw

(4) Differentiate for the PDF:

fW(w)=ddw(1−e−λw−λwe−λw)≫≫λe−λw−λe−λw+λ2we−λw≫≫λ2we−λw

This is the Erlang(2,λ) density function:

λℓ(ℓ−1)!tℓ−1e−λt|ℓ=2

Exp plus Exp equals Erlang - With Convolution

Let us verify this formula by direct calculation:

“Exp(λ)+Exp(λ)∼Erlang(2,λ)”

Solution

Let X,Y∼Exp(λ) be independent RVs.

Therefore:

fX=fY={λe−λxx≥00otherwise

Now compute the convolution, assuming w≥0:

fX+Y(w)=∫−∞+∞fX(w−x)fY(x)dx≫≫∫0wλ2e−λ(w−x)e−λxdx≫≫λ2∫0we−λwdx≫≫λ2we−λw

This is the Erlang PDF:

fX(t)=λℓ(ℓ−1)!tℓ−1e−λt|ℓ=2

Combining normals

Suppose X∼𝒩(40,16), Y∼𝒩(15,9). Find the probability that X≥2Y.

Solution

Define W=X−2Y. Using the formulas above, we see W∼𝒩(10,52), or W∼52Z+10 for a standard normal Z. Then:

P[X≥2Y]≫≫P[W≥0]≫≫P[Z≥−1052]≫≫P[Z≤1.39]≫≫≈0.918