Lecture 6. F) Covariance and Correlation

From Significant Statistics
Jump to navigation Jump to search

Covariance

The covariance of [math]X[/math] and [math]Y[/math] is

[math]Cov\left(X,Y\right)=\sigma_{XY}=E\left[\left(X-\mu_{X}\right)\left(Y-\mu_{Y}\right)\right].[/math]

Some properties:

  • [math]Cov\left(X,Y\right)=...=E\left(XY\right)-E\left(X\right)E\left(Y\right).[/math]
  • [math]Cov\left(X,X\right)=Var\left(X\right).[/math]
  • [math]Cov\left(X,Y\right)=0[/math] if [math]X[/math] and [math]Y[/math] are independent.

Correlation

The correlation of [math]X[/math] and [math]Y[/math] is

[math]Corr\left(X,Y\right)=\rho_{XY}=\frac{Cov\left(X,Y\right)}{\sigma_{X}\sigma_{Y}}=\frac{\sigma_{XY}}{\sigma_{X}\sigma_{Y}},[/math]

i.e., the correlation is equal to the covariance, standardized by the product of the standard deviations of the variables.

Some properties:

  • If [math]X[/math] and [math]Y[/math] are independent, then [math]\rho_{XY}=0[/math] .
  • [math]\left|\rho_{XY}\right|\leq1[/math], by the Cauchy-Schwarz inequality (explained next).
  • [math]\left|\rho_{XY}\right|=1[/math] if [math]P\left(Y=aX\pm b\right)=1[/math] for some [math]a\neq0,b\in\mathbb{R}[/math].
  • [math]\rho_{XY}[/math] is a measure of linear dependence.