AcademyProbability
Academy
Variance
Level 1 - Math II (Physics) topic page in Probability.
Principle
Variance is the expected squared deviation from the mean. Standard deviation is the square root of variance, so it returns the spread to the original unit of the random variable.
Notation
\(X\)
random variable
\(\mu=E[X]\)
mean of X
\(\operatorname{Var}(X)\)
variance of X
\(\sigma_X\)
standard deviation of X
\(a,b\)
constants in an affine transformation aX+b
Method
Step 1: Find the mean
Compute \(\mu=E[X]\). Deviations are measured from this centre.
Step 2: Average squared deviations
Square each deviation before averaging, so positive and negative deviations both contribute to spread.
Definition
\[\operatorname{Var}(X)=E[(X-\mu)^2]\]
Expand the square
\[(X-\mu)^2=X^2-2\mu X+\mu^2\]
Take expectation
\[E[(X-\mu)^2]=E[X^2-2\mu X+\mu^2]\]
Use linearity
\[E[(X-\mu)^2]=E[X^2]-2\mu E[X]+\mu^2\]
Substitute E[X]=mu
\[E[(X-\mu)^2]=E[X^2]-2\mu^2+\mu^2\]
Simplify
\[\operatorname{Var}(X)=E[X^2]-\mu^2=E[X^2]-E[X]^2\]
Step 3: Take the square root for standard deviation
Variance is in squared units. Standard deviation is easier to interpret physically because it has the original unit.
Rules
Variance definition
\[\operatorname{Var}(X)=E[(X-\mu)^2]\]
Computational formula
\[\operatorname{Var}(X)=E[X^2]-E[X]^2\]
Standard deviation
\[\sigma_X=\sqrt{\operatorname{Var}(X)}\]
Affine rule
\[\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)\]
Independent sum
\[X,Y\ \text{independent}\quad\Rightarrow\quad \operatorname{Var}(X+Y)=\operatorname{Var}(X)+\operatorname{Var}(Y)\]
Examples
Question
A random variable has
\[P(X=0)=0.2\]
\[P(X=1)=0.5\]
and \[P(X=2)=0.3\]
Find its variance.Answer
First
\[E[X]=0(0.2)+1(0.5)+2(0.3)=1.1\]
Then \[E[X^2]=0^2(0.2)+1^2(0.5)+2^2(0.3)=1.7\]
Hence \[\operatorname{Var}(X)=1.7-(1.1)^2=0.49.\]
Checks
- Variance units are squared units.
- Standard deviation has the original unit of the random variable.
- Adding a constant does not change variance: \(\operatorname{Var}(X+b)=\operatorname{Var}(X)\).
- Multiplying by \(a\) multiplies standard deviation by \(|a|\) and variance by \(a^2\).
- Variances add directly only when the variables are independent in this rule.