Variance

Variance

Definition: Variance

Let a population consist of \(n\) elements, \(\{x_1; x_2; \ldots; x_n\}\). Write the mean of the data as \(\overline{x}\).

The variance of the data is the average squared distance between the mean and each data value. \[\sigma^2 = \cfrac{\sum_{i=1}^n (x_i - \overline{x})^2}{n}\]

Fact:

The variance is written as \(\sigma^2\). It might seem strange that it is written in squared form, but you will see why soon when we discuss the standard deviation.

The variance has the following properties.

  • It is never negative since every term in the variance sum is squared and therefore either positive or zero.
  • It has squared units. For example, the variance of a set of heights measured in centimetres will be given in centimeters squared. Since the population variance is squared, it is not directly comparable with the mean or the data themselves. In the next section we will describe a different measure of dispersion, the standard deviation, which has the same units as the data.

Example

Question

You flip a coin \(\text{100}\) times and it lands on heads \(\text{44}\) times. You then use the same coin and do another \(\text{100}\) flips. This time in lands on heads \(\text{49}\) times. You repeat this experiment a total of \(\text{10}\) times and get the following results for the number of heads. \[\{44; 49; 52; 62; 53; 48; 54; 49; 46; 51\}\]

Compute the mean and variance of this data set.

Compute the mean

The formula for the mean is \[\overline{x} = \cfrac{\sum_{i=1}^n x_i}{n}\]

In this case, we sum the data and divide by \(\text{10}\) to get \(\overline{x} = \text{50.8}\).

Compute the variance

The formula for the variance is \[\sigma^2 = \cfrac{\sum_{i=1}^n (x_i - \overline{x})^2}{n}\]

We first subtract the mean from each datum and then square the result.

\(x_i\) \(\text{44}\) \(\text{49}\) \(\text{52}\) \(\text{62}\) \(\text{53}\) \(\text{48}\) \(\text{54}\) \(\text{49}\) \(\text{46}\) \(\text{51}\)
\(x_i - \overline{x}\) \(-\text{6.8}\) \(-\text{1.8}\) \(\text{1.2}\) \(\text{11.2}\) \(\text{2.2}\) \(-\text{2.8}\) \(\text{3.2}\) \(-\text{1.8}\) \(-\text{4.8}\) \(\text{0.2}\)
\((x_i - \overline{x})^2\) \(\text{46.24}\) \(\text{3.24}\) \(\text{1.44}\) \(\text{125.44}\) \(\text{4.84}\) \(\text{7.84}\) \(\text{10.24}\) \(\text{3.24}\) \(\text{23.04}\) \(\text{0.04}\)

The variance is the sum of the last row in this table divided by \(\text{10}\), so \(\sigma^2 = \text{22.56}\).

This lesson is part of:

Statistics and Probability

View Full Tutorial

Track Your Learning Progress

Sign in to unlock unlimited practice exams, tutorial practice quizzes, personalized weak area practice, AI study assistance with Lexi, and detailed performance analytics.