Session 5.4.1 - Covariance & Correlation — 5-Pair Worked Example

We draw 5 pairs from a bivariate normal (study hours \(X\), sleep hours \(Y\)), then compute the sample covariance and sample correlation by hand.

i Xi (study) Yi (sleep) (Xi−\(\bar x\)) (Yi−\(\bar y\)) (Xi−\(\bar x\))(Yi−\(\bar y\)) (Xi−\(\bar x\))² (Yi−\(\bar y\))²
Σ 0 0

Notes: We report sample quantities using \((n-1)\) in the denominator: \( \widehat{\operatorname{Cov}}(X,Y)=\frac{1}{n-1}\sum (x_i-\bar x)(y_i-\bar y) \) and \( r=\dfrac{\widehat{\operatorname{Cov}}(X,Y)}{s_X s_Y} \), where \( s_X^2=\frac{1}{n-1}\sum (x_i-\bar x)^2 \), \( s_Y^2=\frac{1}{n-1}\sum (y_i-\bar y)^2 \).