Statistics & Probability · Grade 12 and undergraduate
Joint Distributions, Covariance and Correlation
Quick answer
A joint distribution gives P(X = x, Y = y) for every pair of values. Adding across a row or down a column gives the marginal distributions of X and Y. The covariance Cov(X, Y) = E[XY] − E[X]E[Y] measures whether the two tend to be large together; dividing by both standard deviations gives the correlation, between −1 and 1. Independent variables have covariance 0, and in general Var(X + Y) = Var(X) + Var(Y) + 2Cov(X, Y).
What you'll learn
- Find marginal and conditional probabilities from a joint table
- Decide whether two random variables are independent
- Compute covariance and correlation
- Find the variance of a sum of dependent variables
A joint table
Two random variables and have this joint distribution. Each cell is , and the margins hold the row and column sums.
| 0.1 | 0.2 | 0.1 | 0.4 | |
| 0.2 | 0.1 | 0.3 | 0.6 | |
| 0.3 | 0.3 | 0.4 | 1 |
The covariance and correlation are
and for any and , .
Why covariance measures moving together
The definition is . When is above its mean at the same times is above its mean, the product of the two deviations is positive, and the average is positive. Opposite movements give negative products, so the sign of the covariance tells the direction of the relationship. Expanding the product gives the shortcut . If and are independent, and the covariance is .
Worked examples
Common mistakes
Practice problems
Use the joint table above.
-
Find .
Answer
Full solution
Read the cell in row , column .
-
Find .
Answer
Full solution
.
-
Find .
Answer
Full solution
.
-
Find .
Answer
Full solution
.
-
Find .
Answer
Full solution
.
-
Find .
Answer
Full solution
.
-
Are and independent?
Answer
No
Full solution
.
-
A student writes . Find .
Answer
Full solution
Constants factor out: .
Frequently asked questions
What is a marginal distribution?
The distribution of one variable alone, found by adding the joint probabilities over all values of the other.
How do I compute covariance?
Cov(X, Y) = E[XY] − E[X]E[Y], where E[XY] adds xy · P(X = x, Y = y) over every cell.
Does zero covariance mean independence?
No. Independence gives covariance 0, but covariance 0 can happen for dependent variables.
What is Var(X + Y) when X and Y are dependent?
Var(X) + Var(Y) + 2Cov(X, Y).