Joint, Marginal and Conditional Distributions

STA 211 · Lecture 13

Introduction

A joint distribution describes two or more random variables simultaneously. It allows probabilities involving combinations of variables, and it provides marginal distributions, conditional distributions, covariance and correlation.

Learning Objectives

You should be able to:

  • construct and interpret joint PMFs and PDFs;
  • obtain marginal and conditional distributions;
  • test independence by factorisation;
  • calculate covariance and correlation; and
  • find the mean and variance of sums.

Joint Discrete Distributions

For discrete XX and YY, the joint PMF is

pX,Y(x,y)=P(X=x,Y=y),p_{X,Y}(x,y) = P(X = x,Y = y),

with

pX,Y(x,y)≥0,∑x∑ypX,Y(x,y)=1.p_{X,Y}(x,y) \geq 0,\quad\quad\sum_{x}^{}{\sum_{y}^{}p_{X,Y}}(x,y) = 1.

The marginal PMFs are

pX(x)=∑ypX,Y(x,y),p_{X}(x) = \sum_{y}^{}p_{X,Y}(x,y),

pY(y)=∑xpX,Y(x,y).p_{Y}(y) = \sum_{x}^{}p_{X,Y}(x,y).

The conditional PMF is

pX∣Y(x∣y)=pX,Y(x,y)pY(y),pY(y)>0.p_{X \mid Y}(x \mid y) = \frac{p_{X,Y}(x,y)}{p_{Y}(y)},\quad\quad p_{Y}(y) > 0.

Example 13.1: Joint table

Suppose the joint PMF is

X∖YX \smallsetminus Y 0 1 2 Row total
0 0.10 0.15 0.05 0.30
1 0.20 0.30 0.20 0.70
Column total 0.30 0.45 0.25 1.00

Then

P(X=1∣Y=2)=0.200.25=0.8.P(X = 1 \mid Y = 2) = \frac{0.20}{0.25} = 0.8.

Joint Continuous Distributions

A joint PDF satisfies

fX,Y(x,y)≥0,f_{X,Y}(x,y) \geq 0,

∫−∞∞∫−∞∞fX,Y(x,y)dxdy=1.\int_{- \infty}^{\infty}{\int_{- \infty}^{\infty}f_{X,Y}}(x,y)\, dx\, dy = 1.

For a region RR,

P((X,Y)∈R)=∬RfX,Y(x,y)dxdy.P\left( (X,Y) \in R \right) = \iint_{R}^{}f_{X,Y}(x,y)\, dx\, dy.

The marginal densities are

fX(x)=∫−∞∞fX,Y(x,y)dy,f_{X}(x) = \int_{- \infty}^{\infty}f_{X,Y}(x,y)\, dy,

fY(y)=∫−∞∞fX,Y(x,y)dx.f_{Y}(y) = \int_{- \infty}^{\infty}f_{X,Y}(x,y)\, dx.

The conditional density is

fX∣Y(x∣y)=fX,Y(x,y)fY(y).f_{X \mid Y}(x \mid y) = \frac{f_{X,Y}(x,y)}{f_{Y}(y)}.

Independence

Discrete variables are independent if

pX,Y(x,y)=pX(x)pY(y)p_{X,Y}(x,y) = p_{X}(x)p_{Y}(y)

for every support point. Continuous variables are independent if

fX,Y(x,y)=fX(x)fY(y)f_{X,Y}(x,y) = f_{X}(x)f_{Y}(y)

throughout the support.

A rectangular support alone does not prove independence; the density must also factorise.

Joint Expectation

For a function gg,

E[g(X,Y)]=∑x∑yg(x,y)pX,Y(x,y)E\left\lbrack g(X,Y) \right\rbrack = \sum_{x}^{}{\sum_{y}^{}g}(x,y)p_{X,Y}(x,y)

or

E[g(X,Y)]=∫∫g(x,y)fX,Y(x,y)dxdy.E\left\lbrack g(X,Y) \right\rbrack = \int\int g(x,y)f_{X,Y}(x,y)\, dx\, dy.

Covariance and Correlation

The covariance is

Cov(X,Y)=E[(X−E(X))(Y−E(Y))]Cov(X,Y) = E\left\lbrack \left( X - E(X) \right)\left( Y - E(Y) \right) \right\rbrack

or

Cov(X,Y)=E(XY)−E(X)E(Y).Cov(X,Y) = E(XY) - E(X)E(Y).

The correlation coefficient is

ρXY=Cov(X,Y)σXσY,\rho_{XY} = \frac{Cov(X,Y)}{\sigma_{X}\sigma_{Y}},

where −1≤ρXY≤1- 1 \leq \rho_{XY} \leq 1.

Independence implies zero covariance when the required moments exist, but zero covariance does not generally imply independence.

Sums and Linear Combinations

For constants a,b,c,da,b,c,d,

Cov(aX+b,cY+d)=acCov(X,Y).Cov(aX + b,cY + d) = acCov(X,Y).

The variance of a sum is

Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y).Var(X + Y) = Var(X) + Var(Y) + 2Cov(X,Y).

If XX and YY are independent,

Var(X+Y)=Var(X)+Var(Y).Var(X + Y) = Var(X) + Var(Y).

Post-Test

  1. Define a joint PMF and state its normalisation condition.
  2. Explain how to obtain a marginal distribution.
  3. If E(X)=2E(X) = 2, E(Y)=3E(Y) = 3 and E(XY)=8E(XY) = 8, find Cov(X,Y)Cov(X,Y).
  4. If Var(X)=4Var(X) = 4, Var(Y)=9Var(Y) = 9 and Cov(X,Y)=2Cov(X,Y) = 2, find Var(X+Y)Var(X + Y).
  5. Does zero correlation always imply independence? Explain.

Selected answers: 3. 22; 4. 1717; 5. No, except under additional conditions such as joint normality.