Skip to content

Joint Distributions and Independence

Definition. The joint CDF of (X,Y)(X, Y) is FX,Y(x,y)=P(Xx,Yy)F_{X,Y}(x, y) = P(X \leq x, Y \leq y).

Definition. The joint PDF (for continuous random variables) is fX,Y(x,y)0f_{X,Y}(x, y) \geq 0 such that

FX,Y(x,y)=xyfX,Y(u,v)dudvF_{X,Y}(x, y) = \int_{-\infty}^{x}\int_{-\infty}^{y} f_{X,Y}(u, v)\, du\, dv

Definition. The marginal PDF of XX is fX(x)=fX,Y(x,y)dyf_X(x) = \int_{-\infty}^{\infty} f_{X,Y}(x, y)\, dy.

Definition. The covariance of XX and YY is

Cov(X,Y)=E[(XE[X])(YE[Y])]=E[XY]E[X]E[Y]\mathrm{Cov}(X, Y) = E[(X - E[X])(Y - E[Y])] = E[XY] - E[X]E[Y]

Proposition 2.6. Cov(X,Y)=Cov(Y,X)\mathrm{Cov}(X, Y) = \mathrm{Cov}(Y, X) and Cov(aX+b,cY+d)=acCov(X,Y)\mathrm{Cov}(aX + b, cY + d) = ac\,\mathrm{Cov}(X, Y).

Definition. The correlation coefficient is

ρ(X,Y)=Cov(X,Y)Var(X)Var(Y)\rho(X, Y) = \frac{\mathrm{Cov}(X, Y)}{\sqrt{\mathrm{Var}(X)\,\mathrm{Var}(Y)}}

Theorem 2.7 (Cauchy—Schwarz for Random Variables). ρ(X,Y)1|\rho(X, Y)| \leq 1, with equality if and only if Y=aX+bY = aX + b almost surely for some a,ba, b.

Definition. XX and YY are independent if FX,Y(x,y)=FX(x)FY(y)F_{X,Y}(x, y) = F_X(x)\, F_Y(y) for all x,yx, y.

For continuous random variables, this is equivalent to fX,Y(x,y)=fX(x)fY(y)f_{X,Y}(x, y) = f_X(x)\, f_Y(y).

Proposition 2.8. If XX and YY are independent, then Cov(X,Y)=0\mathrm{Cov}(X, Y) = 0. The converse is false.

Worked Example: Uncorrelated but Dependent

Solution. Let XN(0,1)X \sim N(0, 1) and Y=X2Y = X^2. Then Cov(X,Y)=E[X3]E[X]E[X2]=001=0\mathrm{Cov}(X, Y) = E[X^3] - E[X]E[X^2] = 0 - 0 \cdot 1 = 0 (since the third moment of a standard normal is 0).

But YY is completely determined by XX, so they are not independent. \blacksquare

Definition. The conditional PDF of YY given X=xX = x is:

fYX(yx)=fX,Y(x,y)fX(x)f_{Y|X}(y|x) = \frac{f_{X,Y}(x, y)}{f_X(x)}

provided fX(x)>0f_X(x) > 0.

Definition. The conditional expectation of YY given X=xX = x is:

E[YX=x]=yfYX(yx)dyE[Y | X = x] = \int_{-\infty}^{\infty} y\, f_{Y|X}(y|x)\, dy

The random variable E[YX]E[Y | X] has the property that E[E[YX]]=E[Y]E[E[Y|X]] = E[Y] (law of total expectation).

The bivariate normal distribution has joint PDF:

fX,Y(x,y)=12πσXσY1ρ2exp(12(1ρ2)[(xμX)2σX22ρ(xμX)(yμY)σXσY+(yμY)2σY2])f_{X,Y}(x, y) = \frac{1}{2\pi\sigma_X\sigma_Y\sqrt{1 - \rho^2}} \exp\left(-\frac{1}{2(1 - \rho^2)}\left[\frac{(x - \mu_X)^2}{\sigma_X^2} - 2\rho\frac{(x - \mu_X)(y - \mu_Y)}{\sigma_X\sigma_Y} + \frac{(y - \mu_Y)^2}{\sigma_Y^2}\right]\right)

where ρ=Corr(X,Y)\rho = \mathrm{Corr}(X, Y).

Properties of the bivariate normal:

  • Marginal distributions are normal: XN(μX,σX2)X \sim N(\mu_X, \sigma_X^2), YN(μY,σY2)Y \sim N(\mu_Y, \sigma_Y^2).
  • Conditional distribution is normal: YX=xN(μY+ρσYσX(xμX), σY2(1ρ2))Y | X = x \sim N\left(\mu_Y + \rho \frac{\sigma_Y}{\sigma_X}(x - \mu_X),\ \sigma_Y^2(1 - \rho^2)\right).
  • XX and YY are independent if and only if ρ=0\rho = 0.

3.6 Transformations of Joint Distributions

Section titled “3.6 Transformations of Joint Distributions”

For a transformation (U,V)=g(X,Y)(U, V) = g(X, Y) where gg is a diffeomorphism, the joint PDF is:

fU,V(u,v)=fX,Y(g1(u,v))detJg1f_{U,V}(u, v) = f_{X,Y}(g^{-1}(u, v)) \cdot |\det J_{g^{-1}}|

where JJ is the Jacobian matrix of the inverse transformation.

Example. Let X,YX, Y be independent exponential(λ\lambda) random variables. The joint PDF of U=X+YU = X + Y and V=X/(X+Y)V = X/(X + Y) factors as fU,V(u,v)=λ2ueλuχ(0,1)(v)f_{U,V}(u, v) = \lambda^2 u e^{-\lambda u} \cdot \chi_{(0,1)}(v), showing UU and VV are independent with UGamma(2,λ)U \sim \mathrm{Gamma}(2, \lambda) and VUniform(0,1)V \sim \mathrm{Uniform}(0, 1).

If XX and YY are independent, the PDF of Z=X+YZ = X + Y is the convolution:

fZ(z)=fX(zy)fY(y)dy=fX(x)fY(zx)dxf_Z(z) = \int_{-\infty}^{\infty} f_X(z - y)\, f_Y(y)\, dy = \int_{-\infty}^{\infty} f_X(x)\, f_Y(z - x)\, dx

For moment generating functions: MZ(t)=MX(t)MY(t)M_Z(t) = M_X(t)\, M_Y(t).

Problem 1. Let XX and YY have joint PDF fX,Y(x,y)=c(1x2y2)f_{X,Y}(x, y) = c(1 - x^2 - y^2) for x2+y21x^2 + y^2 \leq 1. Find cc, the marginal PDFs, and P(X>0,Y>0)P(X > 0, Y > 0).

Problem 2. Show that if Cov(X,Y)=0\mathrm{Cov}(X, Y) = 0 for a bivariate normal pair, then XX and YY are independent.

Problem 3. Let XX and YY be independent standard normal variables. Find the distribution of R=X2+Y2R = \sqrt{X^2 + Y^2} and Θ=arctan(Y/X)\Theta = \arctan(Y/X).

Solution. RR has Rayleigh distribution with PDF fR(r)=rer2/2f_R(r) = r e^{-r^2/2} for r0r \geq 0, and ΘUniform(0,2π)\Theta \sim \mathrm{Uniform}(0, 2\pi), and RR and Θ\Theta are independent. \blacksquare

Problem 4. Suppose XN(0,1)X \sim N(0, 1) and Y=X+ZY = X + Z where ZN(0,1)Z \sim N(0, 1) is independent of XX. Find the joint distribution of (X,Y)(X, Y) and compute Cov(X,Y)\mathrm{Cov}(X, Y).

3.9 Law of Total Probability and Bayes’ Theorem for Distributions

Section titled “3.9 Law of Total Probability and Bayes’ Theorem for Distributions”

Law of total probability: fY(y)=fYX(yx)fX(x)dxf_Y(y) = \int_{-\infty}^{\infty} f_{Y|X}(y|x)\, f_X(x)\, dx.

Bayes’ theorem: fXY(xy)=fYX(yx)fX(x)fY(y)=fYX(yx)fX(x)fYX(yt)fX(t)dtf_{X|Y}(x|y) = \frac{f_{Y|X}(y|x)\, f_X(x)}{f_Y(y)} = \frac{f_{Y|X}(y|x)\, f_X(x)}{\int f_{Y|X}(y|t)\, f_X(t)\, dt}.

3.10 Moment Generating Functions for Joint Distributions

Section titled “3.10 Moment Generating Functions for Joint Distributions”

The joint moment generating function of (X,Y)(X, Y) is:

MX,Y(s,t)=E[esX+tY]M_{X,Y}(s, t) = E[e^{sX + tY}]

If XX and YY are independent, then MX,Y(s,t)=MX(s)MY(t)M_{X,Y}(s, t) = M_X(s)\, M_Y(t). Joint moments can be recovered by differentiation:

E[XmYn]=m+nsmtnMX,Y(s,t)s=t=0E[X^m Y^n] = \frac{\partial^{m+n}}{\partial s^m \partial t^n} M_{X,Y}(s, t)\big|_{s=t=0}

Problem 5. Let (X,Y)(X, Y) have joint PDF fX,Y(x,y)=6xf_{X,Y}(x, y) = 6x for 0<x<10 < x < 1, 0<y<1x0 < y < 1 - x. Find the marginal PDFs and determine if XX and YY are independent.

Problem 6. Suppose XX and YY are independent exponential random variables with rate λ\lambda. Find the distribution of X+YX + Y and X/(X+Y)X/(X + Y). Are they independent?

Problem 7. Show that Var(X)=E[Var(XY)]+Var(E[XY])\mathrm{Var}(X) = E[\mathrm{Var}(X|Y)] + \mathrm{Var}(E[X|Y]) (the variance decomposition formula).