TOPIC

Spread of a data set - standard deviation & variance

MY PROGRESS

Pug Score

0%

Best Streak

0 in a row

Study Points

+0

Overview

Practice

Watch

Read

Next Steps


Get Started

Get unlimited access to all videos, practice problems, and study tools.

Unlimited practice
Full videos

Back to Menu

Topic Progress

Pug Score

0%

Videos Watched

0/0

Best Practice

No score

Read

Not viewed


Best Streak

0 in a row

Study Points

+0

Read

Standard Deviation and Variance

This lesson explains how to measure the spread of a data set using mean absolute deviation, variance, and standard deviation. It covers the population and sample formulas, walks through a worked example step by step, and shows how these measures describe how far data values typically fall from the mean.

Why Measure the Spread of a Data Set?

The mean, median, and mode tell you where the "middle" of a data set is, but they say nothing about how tightly or loosely the values cluster around that middle. Two data sets can share the exact same mean and still look completely different: one might have every value packed close together, while the other has values scattered far apart. Standard deviation and variance are the two most common tools statisticians use to describe exactly how spread out a data set is.

Mean Absolute Deviation

Before jumping into variance, it helps to understand the simplest possible measure of spread: the mean absolute deviation (MAD). For each value \(x_i\) in the data set, find its deviation from the mean, \(x_i - \bar{x}\), take the absolute value so negative and positive deviations do not cancel out, and average all of those absolute deviations:

\( MAD = \dfrac{\sum |x_i - \bar{x}|}{n} \)

MAD is easy to interpret, but because it uses absolute value it is awkward to work with algebraically. That is why variance, which squares the deviations instead, is used far more often in statistics.

Variance: Squaring the Deviations

Variance also starts from the deviations \(x_i - \bar{x}\), but instead of taking the absolute value, it squares each deviation. Squaring removes the negative signs (just like absolute value does) but also has much nicer mathematical properties, which is why almost every advanced statistical technique is built on variance rather than MAD.

For a population of \(N\) values with mean \(\mu\), the population variance is:

\( \sigma^2 = \dfrac{\sum (x_i - \mu)^2}{N} \)

For a sample of \(n\) values with mean \(\bar{x}\), the sample variance is:

\( s^2 = \dfrac{\sum (x_i - \bar{x})^2}{n-1} \)

Notice the denominator changes from \(N\) to \(n-1\). Dividing by \(n-1\) instead of \(n\) corrects a small bias that occurs when you estimate spread from a sample instead of measuring an entire population, so the sample variance ends up being a slightly more reliable estimate.

Standard Deviation: Undoing the Square

Squaring the deviations solves the sign problem, but it also changes the units. If your data is measured in centimetres, variance is in square centimetres, which is not very intuitive. Standard deviation fixes this by taking the square root of the variance, bringing the measure of spread back into the original units.

Population standard deviation: \( \sigma = \sqrt{\dfrac{\sum (x_i - \mu)^2}{N}} \)

Sample standard deviation: \( s = \sqrt{\dfrac{\sum (x_i - \bar{x})^2}{n-1}} \)

A small standard deviation means the data values sit close to the mean; a large standard deviation means the values are spread out widely. This is exactly the idea used later when locating a value's z-score among measures of relative position.

Data values on a number line 2 4 5 7 9 mean = 5 deviation = −3 deviation = 4
Each point's distance from the mean (its deviation) is what standard deviation and variance measure.

Worked Example: Step by Step

Consider the data set: 2, 4, 4, 4, 5, 5, 7, 9.

Step 1: Find the mean. Add all 8 values (2+4+4+4+5+5+7+9 = 40) and divide by \(n = 8\), giving \(\bar{x} = 5\).

Step 2: Find each deviation. Subtract the mean from every value: \(-3, -1, -1, -1, 0, 0, 2, 4\).

Step 3: Square each deviation. This gives \(9, 1, 1, 1, 0, 0, 4, 16\), which sum to 32.

Step 4: Divide to get variance. Treating this as a population (\(N=8\)): \( \sigma^2 = \dfrac{32}{8} = 4 \). Treating it as a sample (\(n=8\)): \( s^2 = \dfrac{32}{7} \approx 4.57 \).

Step 5: Take the square root for standard deviation. Population: \( \sigma = \sqrt{4} = 2 \). Sample: \( s = \sqrt{4.57} \approx 2.14 \).

Notice that the sample values are always a little larger than the population values for the same data, since dividing by \(n-1\) instead of \(n\) makes the result bigger.

Population vs. Sample: Which Formula to Use

Use the population formulas (dividing by \(N\)) only when your data set represents an entire population, meaning every possible member has been measured. In almost every real study, you only have a sample drawn from a larger population, so you should use the sample formulas (dividing by \(n-1\)) unless a problem explicitly tells you the data is the full population.

Related lessons