You are on page 1of 12

2.

Data, Variables & Moments: Variance

Ian Crawford

Department of Economics

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 1 / 12


Intro

The second moment is the variance and this tells us about the
variability/spread of the distribution.
It is still an “expectation” though, of a kind.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 2 / 12


Variance

The variance is the mean of the squared difference between the


variable and its expectation:
 
Var ( X ) = E [ X − E ( X )]2 = E X 2 − [E ( X )]2


By definition the variance is non-negative.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 3 / 12


Variance

For the discrete and continuous cases:



2
 ∑i ( xi − µ ) f ( xi )

 X : discrete

Var ( X ) = R∞ 2
−∞ ( x − µ ) f ( x ) dx



 X : continuous

where µ denotes the expected value of the variable.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 4 / 12


Variance - Standard Deviation

The standard deviation of a variable is the square root of the variance.


q
SD ( X ) = Var ( X )

Expectations are in the same units as the variable. Variances are in


squared units (e.g. £2 ) so the standard deviation is used to give a
measure of dispersion which is comparable to the mean and the
variable of interest.
Standard notation for the variance of a variable is σ2 and for the
standard deviation of a variable is σ.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 5 / 12


Variance - Uniform distribution

Example: The variance of the uniform is

( b − a )2
Var ( X ) =
12

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 6 / 12


Variance - Normal/Gaussian distribution

Example: The variance of a Normal N (µ, σ2 ) is every bit as nasty as its


expectation. But as with the expected value, it all works out nicely in the
end:

Var ( X ) = σ2
So the two parameters of the Normal {µ, σ2 } have direct interpretations
as the mean and the variance of the distribution.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 7 / 12


Variance - Binary Variables

For binary/indicator variables where p is the proportion of 1’s in the


population, it can be shown that the variance is

Var ( X ) = p(1 − p)

This clearly makes some intuitive sense: if the variable is entirely 0’s
or entirely 1’s then the variance is zero and if it’s half-and-half the
variance will be maximised.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 8 / 12


Variance - Binary Variables

This means that if you know p, the mean of the binary variable and
hence the proportion of 1’s, you immediately know the variance too.
This is not the case with variables which are not binary/indicators –
knowing the mean doesn’t tell you the variance.
This turns out to be important in statistical inference regarding
proportions.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 9 / 12


Variance - Normal distributions

You can transform any Normal variable N (µ, σ) into a a Standard


Normal by taking off the mean and dividing by the standard
deviation. For example, if

X v N (µ, σ)

then
X−µ
Z= v N (0, 1)
σ

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 10 / 12


Variance - Normal distributions

The standardised variable is expressed in units of standard deviations.


X−µ distance from the mean
Z= =
σ standard deviation
For example, if an observation from a Standard Normal takes the
value 1 then it is one standard deviation above the mean (the mean is
zero) and if it take a value of -2 it is 2 standard deviations below the
mean.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 11 / 12


Variance - Normal distributions

Empirical Rule: For large populations that are approximately N (µ, σ2 ),


the standard deviation σ tells us where most observations will be relative
to the mean:
≈ 68% of observations are within 1 standard deviation of the mean,
i.e. in the interval µ ± σ
≈ 95% of observations are within 2 standard deviation of the mean,
i.e. in the interval µ ± 2σ
almost all of the observations are within 3 standard deviation of the
mean in the interval µ ± 3σ
When people talk about “6 standard deviation events” they are saying it
is extremely rare.

Ian Crawford (Department of Economics) 2. Data, Variables & Moments: Variance 12 / 12

You might also like