| Definition
For a random variable X, if the expected value (or mean) is E[X],
then the variance of X, or var(X), or usually denoted as σ2,
is E[(X-E[X])2].
Properties
var(cX) E[(cX - E[cX])2] c2var(X)
If X and Y are independent, then var(X+Y)
E[(X+Y-E[X+Y])2]
E[(X-E[X])2 + ([Y-E[Y])2]
E[(X-E[X])2 + (Y-E[Y])2 + 2(Y-E[Y])(X-E[X])]
E[(X-E[X])2] + E[(X-E[X])2] + 2E[(Y-E[Y])(X-E[X])]
var(X) + var(Y) + 2E[XY - XE[Y] + YE[X] + E[X]E[Y]]
var(X) + var(Y)
Similarly, var(X-Y) var(X) + var(Y) if X and Y are independent.
Computing
Suppose the mean value of all items in vector x is x0, then
var(x) σ(
x1-x0)2 +
x2-x0)2 +
+ ... +
xn-x0)2)/n
Note that here w...[more] |