Variance, Covariance, Correlation (Second-Order Moments)
The variance of a random variable is its second central moment, and measures the spread of values around its expected value, such that
The square root of variance, , is known as the standard deviation of .
Given random variables , the variance of their sum can generally be expressed as
where is the second mixed central moment of and , such that
and serves as a measure of the linear association between them (i.e., negative correlation indicates inverse relationship and vice-versa). Note that if are independent, then (but not the other way around).A measure for covariance normalized by the product of their standard deviations is given by the unit-less correlation coefficient. Formally,
where , such that indicates no relationship between and .Non-Negativity of Variance for all , the variance of any random variable is always non-negative.
Since
Intuition
Properties
(Cond. Variance) Any satisfy
(Total Variance) Any satisfy .
(Linearity of Covariance).
Examples
(Easy) Optimal Hedge Ratio
You just bought one share of stock and want to hedge it by shorting stock . A short is an investment strategy where you borrow stock and sell it immediately rather than buy it, in the hopes that you will be able to buy it and return it at a lower price in the future. Assume that the variance of stock ‘s return is , the variance of stock ‘s return is , and their correlation coefficient is .
How many shares of should you short to minimize the variance of the hedged position? Denote as the value of your portfolio. We are trying to solve for . We proceed as follows:
\frac{\delta}{\delta k}\operatorname{Var}(P)&= \frac{\delta}{\delta k}[\sigma^2_{A}+k^2\sigma^2_{B}-2k\rho \sigma_{A} \sigma_{B}] \
&= 2k\sigma^2_{B}-2\rho\sigma_{A}\sigma_{B} \
&= 0 \iff k^*= \rho\frac{\sigma_{A}}{\sigma_{B}},
\end{align}$$
which is known as the Beta coefficient in portfolio management, and is used to evaluate the relative risk of stock to stock .
(Hard) Elevator Variance
A building has n upper floors numbered , plus a ground floor . At the ground floor, people get on the elevator together, and each person gets off at one of the upper floors uniformly at random and independently of everyone else.
What is the variance of the number of floors the elevator does not stop at? be the indicator that nobody gets off at floor . Then, let be the number of floors that the elevator does not stop at. The probability that a person exits on each form is uniform with a value of . Since each person exits independently, then the probability that none of the people exit on each floor is . As such,
Let
Then, $\operatorname{Var}(N)=\mathbb{E}(X^2)-E(X)^2=n\left ( 1-\dfrac{1}{n} \right )^m - n^2\left ( 1-\dfrac{1}{n} \right )