Variance (of a discrete random variable)

The Ministry is migrating nzmaths content to Tāhurangi.           
Relevant and up-to-date teaching resources are being moved to Tāhūrangi (tahurangi.education.govt.nz). 
When all identified resources have been successfully moved, this website will close. We expect this to be in June 2024. 
e-ako maths, e-ako Pāngarau, and e-ako PLD 360 will continue to be available. 

For more information visit https://tahurangi.education.govt.nz/updates-to-nzmaths

A measure of spread for a distribution of a random variable that determines the degree to which the values of a random variable differ from the expected value.

The variance of random variable X is often written as Var(X) or σ2 or σ2x.

For a discrete random variable the variance is calculated by summing the product of the square of the difference between the value of the random variable and the expected value, and the associated probability of the value of the random variable, taken over all of the values of the random variable.

In symbols, Var(X) = (x - µ)2 P(X = x)  

An equivalent formula is, Var(X) = E(X2) – [E(X)]2

The square root of the variance is equal to the standard deviation.

Example

Random variable X has the following probability function:

 

 

x 0 1 2 3
P(X = x) 0.1 0.2 0.4 0.3


Using Var(X) = (x - µ)2 P(X = x)

 

 

µ    = 0 x 0.1 + 1 x 0.2 + 2 x 0.4 + 3 x 0.3
        = 1.9

Var(X)    = (0 – 1.9)2x 0.1 + (1 – 1.9)2x 0.2 + (2 – 1.9)2x 0.4 + (3 – 1.9)2x 0.3
    = 0.89
 
Using Var(X) = E(X2) – [E(X)]2  

E(X)    = 0 x 0.1 + 1 x 0.2 + 2 x 0.4 + 3 x 0.3
    = 1.9

E(X2)    = 02 × 0.1 + 12 × 0.2 + 22 × 0.4 + 32 × 0.3
        = 4.5

Var(X)    = 4.5 – 1.92  
        = 0.89

See: population variance, variance

Curriculum achievement objectives reference
Probability: (Level 8)