Skip to content
LeetQuant
F4 Random Variables and Expectation

F4 · Random Variables and Expectation · Lesson 5 of 8

Correlation, Covariance & the Bivariate Normal

Covariance algebra, the limits on correlation, uncorrelated versus independent, and conditioning jointly normal variables.

25 min

Covariance algebra

Cov⁡(X,Y)=E[XY]−E[X]E[Y]\operatorname{Cov}(X, Y) = \mathbb{E}[XY] - \mathbb{E}[X]\mathbb{E}[Y] is bilinear: constants and sums pull out of each slot.

Var⁡(aX+bY)=a2σX2+b2σY2+2ab ρ σXσY.\operatorname{Var}(aX + bY) = a^2\sigma_X^2 + b^2\sigma_Y^2 + 2ab\,\rho\,\sigma_X\sigma_Y .

Correlation ρ=Cov⁡(X,Y)/(σXσY)\rho = \operatorname{Cov}(X,Y) / (\sigma_X\sigma_Y) lies in [−1,1][-1, 1] by the Cauchy–Schwarz inequality, and is unchanged by shifting or positively rescaling either variable.

A quick consequence: for i.i.d. XX and YY, Corr⁡(X,X+Y)=σ2σ⋅2 σ=12≈0.71\operatorname{Corr}(X, X + Y) = \dfrac{\sigma^2}{\sigma \cdot \sqrt2\,\sigma} = \dfrac{1}{\sqrt2} \approx 0.71.

Uncorrelated is not independent

Correlation measures only linear association. If X∼N(0,1)X \sim N(0, 1) and Y=X2Y = X^2, then Cov⁡(X,Y)=E[X3]=0\operatorname{Cov}(X, Y) = \mathbb{E}[X^3] = 0, yet YY is a function of XX. A screen that keeps only correlated features would miss this relationship entirely.

The one important exception: if XX and YY are jointly normal, uncorrelated does imply independent. Two separately normal variables need not be jointly normal.

Not every set of correlations is possible

A correlation matrix must be positive semi-definite. For three variables, given ρAB\rho_{AB} and ρAC\rho_{AC},

ρBC∈[ρABρAC−(1−ρAB2)(1−ρAC2),    ρABρAC+(1−ρAB2)(1−ρAC2)].\rho_{BC} \in \Big[\rho_{AB}\rho_{AC} - \sqrt{(1 - \rho_{AB}^2)(1 - \rho_{AC}^2)},\;\; \rho_{AB}\rho_{AC} + \sqrt{(1 - \rho_{AB}^2)(1 - \rho_{AC}^2)}\Big].

If AA is correlated 0.90.9 with both BB and CC, then ρBC∈[0.81−0.19, 0.81+0.19]=[0.62,1]\rho_{BC} \in [0.81 - 0.19,\, 0.81 + 0.19] = [0.62, 1]: two things that both track AA closely must track each other. With nn variables sharing one correlation ρ\rho, the bound is ρ≥−1n−1\rho \ge -\tfrac{1}{n-1}.

The bivariate normal

If (X,Y)(X, Y) is bivariate normal, the conditional distribution of YY given X=xX = x is normal with

E[Y∣X=x]=μY+ρσYσX(x−μX),Var⁡(Y∣X)=σY2(1−ρ2).\mathbb{E}[Y \mid X = x] = \mu_Y + \rho\frac{\sigma_Y}{\sigma_X}(x - \mu_X), \qquad \operatorname{Var}(Y \mid X) = \sigma_Y^2(1 - \rho^2) .

The conditional mean is the regression line, and knowing XX removes a fraction ρ2\rho^2 of the variance of YY.

For standardised jointly normal XX and YY with correlation ρ\rho, the probability they have the same sign is

P(XY>0)=12+arcsin⁡ρπ.P(XY > 0) = \frac12 + \frac{\arcsin\rho}{\pi} .

Worked example

what a small correlation buys

A forecast has correlation 0.10.1 with next-day returns, and both are approximately jointly normal with mean zero. If you trade the sign of the forecast, how often are you right?

Show solution
P=12+arcsin⁡0.1π≈12+0.10023.1416≈0.532.P = \frac12 + \frac{\arcsin 0.1}{\pi} \approx \frac12 + \frac{0.1002}{3.1416} \approx 0.532 .

A hit rate of 53% is what a correlation of 0.1 looks like, and over thousands of trades it is a strong signal. For small ρ\rho the hit rate is about 12+ρ/π\tfrac12 + \rho/\pi.

Knowledge check

XX and YY each have variance 1 and correlation 0.50.5. What is Var⁡(X−Y)\operatorname{Var}(X - Y)?

Knowledge check

XX and YY are standard normals with correlation 0.60.6. You observe X=2X = 2. What is E[Y∣X=2]\mathbb{E}[Y \mid X = 2]?

Knowledge check

Four random variables all have the same pairwise correlation ρ. What is the smallest possible ρ?

Practice problems

Finished reading?

Answer the 3 knowledge checks to complete this lesson (0 done).