Expectation, variance and covariance

Database › Mathematics › Applied mathematics › Probability

PROB-0004DefinitionUndergraduate

The expectation is the probability-weighted average of a random variable and is linear; the variance is the mean squared deviation, and covariance measures how two variables vary together.

$$E[X]=\sum_i x_ip_i=\int xf(x)\,dx,\quad V[X]=E[X^2]-E[X]^2,\quad V[aX+bY]=a^2V[X]+b^2V[Y]+2ab\,{\rm Cov}[X,Y]$$

Explanation

Linearity $E[aX+bY]=aE[X]+bE[Y]$ holds whether or not $X$ and $Y$ are independent, which often makes expectations easy to compute through indicator variables. ${\rm Cov}[X,Y]=E[XY]-E[X]E[Y]$ vanishes for independent variables (the converse is false); the correlation coefficient ${\rm Cov}/(\sigma_X\sigma_Y)$ lies in $[-1,1]$.

Chebyshev's inequality $P(|X-\mu|\ge k\sigma)\le1/k^2$ holds for any distribution with finite variance and underlies the law of large numbers: the mean of $n$ independent copies has variance $\sigma^2/n$.

Example 1

Find the mean and variance of the score of one fair die, and of the total of 10 dice.

Solution

$E=\frac{21}6=3.5$, $E[X^2]=\frac{91}6$, $V=\frac{91}6-\frac{49}4=\frac{35}{12}\approx2.92$. For 10 independent dice: mean 35, variance $\frac{350}{12}\approx29.2$.

Example 2

$n$ letters are put at random into $n$ addressed envelopes. Find the expected number that reach the right envelope.

Solution

Let $I_k=1$ if letter $k$ is correct; $E[I_k]=\frac1n$. By linearity $E[\sum I_k]=n\cdot\frac1n=1$, for every $n$, although the $I_k$ are not independent.

Related entries