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).

Mistake 1: Confusing independence with pairwise independence. Two random variables XX and YY are independent if their joint distribution factors as FX,Y(x,y)=FX(x)FY(y)F_{X,Y}(x, y) = F_X(x)F_Y(y). For three or more variables, pairwise independence (each pair is independent) does not imply mutual independence. There exist random variables X,Y,ZX, Y, Z that are pairwise independent but not mutually independent.

Mistake 2: Assuming that zero covariance implies independence. If XX and YY are independent, then Cov(X,Y)=0\mathrm{Cov}(X, Y) = 0, but the converse is false. Uncorrelated variables can be dependent. For example, let XX be uniform on {1,0,1}\{-1, 0, 1\} and Y=X2Y = X^2. Then Cov(X,Y)=0\mathrm{Cov}(X, Y) = 0, but XX and YY are not independent.

Mistake 3: Forgetting that the marginal distribution does not determine the joint distribution. Knowing the marginal distributions fX(x)f_X(x) and fY(y)f_Y(y) does not determine the joint distribution fX,Y(x,y)f_{X,Y}(x, y). The joint distribution also depends on the dependence structure between XX and YY. Two different joint distributions can have the same marginals.

Mistake 4: Confusing the correlation coefficient with the slope of a regression line. The correlation coefficient ρ(X,Y)\rho(X, Y) measures the strength of the linear relationship between XX and YY, but it is not the same as the slope of the regression line of YY on XX. The slope is ρ(X,Y)σY/σX\rho(X, Y) \cdot \sigma_Y / \sigma_X, which depends on the standard deviations.

Mistake 5: Assuming that linear regression is appropriate for nonlinear relationships. Linear regression fits a straight line to the data, but if the relationship between XX and YY is nonlinear, the regression line may be misleading. Always check the scatterplot and consider nonlinear models if the relationship appears curved.

flowchart TD
A[3_Joint Distributions And Independence] --> B[Key Concepts]
A --> C[Core Principles]
A --> D[Practical Applications]
B --> E[Fundamental definitions]
C --> F[Design patterns]
D --> G[Real-world usage]

Joint distributions describe how two or more random variables vary together. Independence means knowing one variable tells you nothing about the other, which mathematically factorizes the joint distribution into a product. Dependence creates structure: positive correlation means variables tend to move together, negative correlation means they move oppositely. The marginal distribution is what you see when you ignore one variable, like looking at a 3D landscape from above. Conditional distributions slice the joint distribution along one variable, revealing how the other behaves given specific information. These concepts form the backbone of statistical modeling.