Introduction to Statistics · Chapter 2 · Descriptive Statistics

Measures of the Spread of the Data

Standard deviation, variance, and the z-score — one number for how spread out the data are, and a way to say exactly how far any single value sits from the mean.


bookSHelf  ·  Introduction to Statistics  ·  §2.7  ·  a self-paced section

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Learning objectives — by the end of this section you will be able to

Objectives

  1. Explain what the standard deviation measures, and why a larger value means more spread §2.7.1
  2. Calculate the sample and population standard deviation, from a list and from a grouped frequency table §2.7.2–2.7.3
  3. Express any data value as the mean plus a number of standard deviations, and read that count as a z-score §2.7.1, §2.7.4
  4. Compare values from two different data sets by putting them on the same z-score scale §2.7.4
  5. State what fraction of the data falls within two or three standard deviations of the mean — for any distribution, and for a bell-shaped one §2.7.5
2.7

§2.7.1 — one number, two jobs

The mean tells you where the data are centered. The standard deviation tells you how far, on average, the data stray from that center — and it gives every individual value a way to report its own distance.

Two supermarkets can share the same average wait and still feel completely different to stand in line at.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.1 — a number that measures spread

Standard Deviation

Definition 2.7.1 — Standard Deviation

The standard deviation is a number that measures how far the data values are from their mean. It is always positive or zero — small when the data cluster near the mean, larger when they spread away from it.

Two jobs, one number

It gives you a single number for the overall variation in a data set, and it gives every individual value a yardstick for how close it sits to the mean.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.1 — same mean, different spread

Two supermarkets, one average wait

Supermarket A

Mean wait: 5 minutes. Standard deviation: 2 minutes — the waits cluster close to five.

Supermarket B

Mean wait: 5 minutes. Standard deviation: 4 minutes — the waits scatter much farther from five.

Same average, different experience: if you value predictability, Supermarket A is the better line — even though the two means are identical.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.1 — counting standard deviations on a line

Rosa and Binh, at Supermarket A

The mean wait is five minutes and the standard deviation is two minutes. Rosa waits seven minutes; Binh waits one minute.

Rosa: 5+(1)(2)=75+(1)(2)=7 — one standard deviation above the mean.
Binh: 5+(2)(2)=15+(-2)(2)=1 — two standard deviations below the mean.

Figure 2.7.1: counting standard deviations on a number line.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.1 — the equation behind the counting

One equation, two alphabets

value=mean+(#ofSTDEVs)(standard deviation)\text{value} = \text{mean} + (\#\text{ofSTDEVs})(\text{standard deviation})

#ofSTDEVs\#\text{ofSTDEVs} does not have to be a whole number — 1.5 standard deviations above the mean is perfectly ordinary.

sample:x=xˉ+(#ofSTDEVs)(s)population:x=μ+(#ofSTDEVs)(σ)\text{sample:}\quad x = \bar{x} + (\#\text{ofSTDEVs})(s) \qquad \text{population:}\quad x = \mu + (\#\text{ofSTDEVs})(\sigma)

ss and xˉ\bar{x} describe a sample; σ\sigma and μ\mu describe a whole population — same idea, different alphabet.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Insight Note — the standard deviation is a typical distance

The standard deviation is a typical distance.

Measure how far every value sits from the mean, then ask what a typical one of those distances is. That is the standard deviation, in the same units as the data — minutes of waiting give a standard deviation in minutes.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Your turn — count the standard deviations

Try It Now 2.7.1

Try It Now 2.7.1 — a morning bus route

A bus route has a mean travel time of 24 minutes with a standard deviation of 3 minutes. Cruz Delgado's trip today took 33 minutes. (a) How many standard deviations above the mean was Cruz's trip? (b) What travel time is two standard deviations below the mean?

3 standard deviations above the mean; 18 minutes below

Cruz's trip was 3324=933-24=9 minutes over, and 9/3=39/3=3 standard deviations. Two standard deviations below the mean: 24+(2)(3)=1824+(-2)(3)=18 minutes.

2.7

§2.7.2 — from deviations to one number

Every value has a signed distance to the mean. Turning that list of distances into one honest number takes two more steps: squaring, then choosing what to divide by.

Add up the raw deviations and you always get zero — that is the whole reason squaring is not optional.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.2 — the signed distance to the mean

Deviation

Definition 2.7.2 — Deviation

If xx is a data value, the difference xmeanx-\text{mean} is its deviation: xμx-\mu for population data, xxˉx-\bar{x} for a sample. A data set has exactly as many deviations as it has values.

Figure: a signed distance to the mean — the signed distances always cancel to zero.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.2 — squaring away the sign

Variance

Definition 2.7.3 — Variance

The variance is the average of the squared deviations — σ2\sigma^2 for a population, s2s^2 for a sample. The standard deviation is its square root: σ=σ2\sigma=\sqrt{\sigma^2}, s=s2s=\sqrt{s^2}.

Figure: squaring turns cancelling signed numbers into positive areas.

Squaring fixes the cancellation problem but creates a units problem — squared minutes are not minutes. The square root at the end brings the answer back to the data's own units.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Context Pause — why square the deviations at all?

Add the raw deviations and you always get zero.

That is what "balance point" means — the positives and negatives cancel exactly. Squaring makes every term positive, so the total finally measures size instead of cancelling itself out.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.2 — what to divide by

Sample vs. population standard deviation

Sample

s=Σ(xxˉ)2n1ors=Σf(xxˉ)2n1s=\sqrt{\frac{\Sigma (x - \bar{x})^2}{n - 1}} \quad\text{or}\quad s=\sqrt{\frac{\Sigma f(x - \bar{x})^2}{n - 1}}

Divide by n1n-1, one less than the sample size.

Population

σ=Σ(xμ)2Norσ=Σf(xμ)2N\sigma=\sqrt{\frac{\Sigma (x - \mu)^2}{N}} \quad\text{or}\quad \sigma=\sqrt{\frac{\Sigma f(x - \mu)^2}{N}}

Divide by NN, the full population count.

ff is how many times a value repeats — the second formula in each pair is the shortcut for data that already arrives as a frequency table.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.2 — how much a statistic wobbles

Sampling Variability of a Statistic

Definition 2.7.4 — Sampling Variability of a Statistic

How much a statistic varies from one sample to another is the sampling variability of a statistic.

Figure: three samples, one population, three different means.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.2 — the wobble in the mean, specifically

Standard Error of the Mean

Definition 2.7.5 — Standard Error of the Mean

The standard error of the mean is the standard deviation of the sampling distribution of the mean — the usual way to measure how much a sample mean would wobble from sample to sample.

σn\frac{\sigma}{\sqrt{n}}

σ\sigma = population standard deviation, nn = sample size

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Context Pause — let the machine do the arithmetic

In practice, a calculator or software finds the standard deviation.

What matters is choosing the right one: a TI-83/84 lists both σx\sigma_x and sxs_x, and picking the population value for sample data is a real mistake, not a rounding difference.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Your turn — mean and standard deviation from a list

Try It Now 2.7.2

Try It Now 2.7.2 — a baseball roster's ages

21; 21; 22; 23; 24; 24; 25; 25; 28; 29; 29; 31; 32; 33; 33; 34; 35; 36; 36; 36; 36; 38; 38; 38; 40. Find the mean and standard deviation. Then find the value two standard deviations above the mean.

xˉ=30.68\bar{x}=30.68, s6.09s\approx 6.09 years

Two standard deviations above the mean: 30.68+(2)(6.09)=42.8630.68+(2)(6.09)=42.86 — older than every player on the roster, so nobody here is unusually old for the team.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Worked example — twenty ages, one table

Example 2.7.1 · Ages in a Fifth Grade Class

Example 2.7.1 — twenty ages (n=20n=20), rounded to the nearest half year

9; 9.5; 9.5; 10; 10; 10; 10; 10.5; 10.5; 10.5; 10.5; 11; 11; 11; 11; 11; 11; 11.5; 11.5; 11.5. (a) Verify the mean and standard deviation. (b) One standard deviation above the mean. (c) Two standard deviations below the mean. (d) 1.5 standard deviations either side.

Because the data are a sample, use x=xˉ+(#ofSTDEVs)(s)x=\bar{x}+(\#\text{ofSTDEVs})(s) — the sample form of the equation from §2.7.1.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Example 2.7.1 — building the variance, column by column

Table 2.7.1 — from deviation to f(xxˉ)2f(x-\bar{x})^2

Data xxFreq. ffDeviation (xxˉ)(x-\bar{x})(xxˉ)2(x-\bar{x})^2f(xxˉ)2f(x-\bar{x})^2
919 − 10.525 = −1.5252.3256252.325625
9.529.5 − 10.525 = −1.0251.0506252.101250
10410 − 10.525 = −0.5250.2756251.102500
10.5410.5 − 10.525 = −0.0250.0006250.002500
11611 − 10.525 = 0.4750.2256251.353750
11.5311.5 − 10.525 = 0.9750.9506252.851875
Total209.7375

Square each deviation, multiply by how often it occurs, and total the column — that total feeds directly into the variance formula.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Example 2.7.1 — worked through

Mean, variance, and four questions answered

Mean, variance, SD

xˉ=210.520=10.53\bar{x}=\dfrac{210.5}{20}=10.53
s2=9.7375201=0.5125s^2=\dfrac{9.7375}{20-1}=0.5125
s=0.51250.72s=\sqrt{0.5125}\approx0.72

Parts b–d

xˉ+1s=10.53+(1)(0.72)=11.25\bar{x}+1s=10.53+(1)(0.72)=11.25
xˉ2s=10.53(2)(0.72)=9.09\bar{x}-2s=10.53-(2)(0.72)=9.09
xˉ1.5s=9.45\bar{x}-1.5s=9.45, xˉ+1.5s=11.61\bar{x}+1.5s=11.61

A calculator gives the same two numbers directly, and because it does not round intermediate results its answer is the more accurate one.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Try it in rāSHio

Check the mean and SD in one panel

Open rāSHio, paste the twenty ages into File → Delimited List…, then choose Stats → Summary Statistics.

The panel labels which standard deviation is which — so the one real trap in this calculation, reading the population value for sample data, is a label you can see rather than a menu entry you have to remember.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Figure 2.7.2 — Stats → Summary Statistics

Mean and standard deviation, read together

Load the column, open Summary Statistics, and the mean and standard deviation arrive side by side.

Use it to check work done by hand, not to skip it — the tool cannot tell you whether you needed the sample or the population formula.

Figure 2.7.2: reading the mean and the standard deviation off one panel in rāSHio.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Context Pause — zero spread is possible

A standard deviation of zero is not an error.

It means every value in the set is identical, so nothing deviates from anything. From there, the more the values disagree with each other, the larger ss or σ\sigma grows — and a single outlier can make it very large.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Your turn — pet-food counts at 29 stores

Try It Now 2.7.3

Try It Now 2.7.3 — pet food varieties carried, per store

6; 6; 6; 6; 7; 7; 7; 7; 7; 8; 9; 9; 9; 9; 10; 10; 10; 10; 10; 11; 11; 11; 11; 12; 12; 12; 12; 12; 12. Find the sample mean and sample standard deviation to one decimal place.

xˉ9.3\bar{x}\approx9.3, s2.2s\approx2.2 types

A store carrying 5 types would sit just under two standard deviations below the mean — close to the borderline for unusual.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Worked example — 31 exam scores, three views

Example 2.7.2 · Exam Scores, Two Graphs and a Chart

Example 2.7.2 — a class of 31 students

33; 42; 49; 49; 53; 55; 55; 61; 63; 67; 68; 68; 69; 69; 72; 73; 74; 78; 80; 83; 88; 88; 88; 90; 92; 94; 94; 94; 94; 96; 100

(a) Chart the frequencies and cumulative relative frequencies. (b) Find the mean, SD, median, quartiles, and IQR. (c) Compare a box plot and a histogram on one set of axes.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Example 2.7.2 — the numbers, from 1-VarStats

Six statistics, one data set

Center and spread

xˉ=73.5\bar{x}=73.5
s=17.9s=17.9
median =73=73

Quartiles and IQR

Q1=61Q_1=61
Q3=90Q_3=90
IQR=9061=29\text{IQR}=90-61=29

Every value is rounded to one decimal place, straight off the calculator's 1-VarStats screen.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Figure 2.7.3 — a box plot and a histogram, one axis

The same spread, drawn twice

Figure 2.7.3: the box plot and histogram of the exam scores, on one set of axes.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Example 2.7.2 — what the graphs say

Same IQR, uneven halves

Lower half spans 40 points; upper half spans 27

7333=4073-33=40 below the median, 10073=27100-73=27 above it — the long left whisker and the short left histogram bars describe the same asymmetry.

The middle 50%, the 29 points of the IQR, covers mostly Ds, Cs, and Bs; the lower 25% is Ds and Fs.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Try it in rāSHio

See the asymmetry immediately

Paste the 31 exam scores into rāSHio and choose Graph → Box Plot.

The five-number summary this example computes by hand is drawn for you — the left whisker runs far, the right one barely moves. Switch to Graph → Histogram on the same data and you are looking at the second half of the same picture.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Figure 2.7.4 — Graph → Box Plot

Building the box plot in rāSHio

The five-number summary — minimum, Q1Q_1, median, Q3Q_3, maximum — draws itself the moment the data are pasted in.

The long left whisker is the picture; the 40-versus-27 split from the previous slide is the arithmetic behind it.

Figure 2.7.4: building the exam-score box plot in rāSHio.

2.7

§2.7.3 — when you only have intervals

With grouped data you cannot recover the exact values, so you cannot find the exact mean, median, or standard deviation either. The fix is the same for all three: pretend every value in an interval sits at that interval's midpoint.

Mean of Frequency Table=ΣfmΣf\text{Mean of Frequency Table} = \frac{\Sigma f m}{\Sigma f}

ff is the interval frequency, mm is the interval midpoint.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Your turn — the same idea, from a calculator

Try It Now 2.7.4

Try It Now 2.7.4 — Table 2.7.3, midpoints 1, 4, 7, 10, 13, 16

ClassFrequency ff
0–21
3–56
6–810
9–117
12–140
15–172

sx3.50s_x\approx3.50

The 1-VarStats screen reports both σx=3.4326\sigma_x=3.4326 and sx=3.5005s_x=3.5005 — these are sample data, so sxs_x is the answer, matching the table method exactly.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Worked example — the full seven-column table

Table 2.7.4 — from midpoint to f(mxˉ)2f(m-\bar{x})^2

Classffmmfmfmmxˉm-\bar{x}(mxˉ)2(m-\bar{x})^2f(mxˉ)2f(m-\bar{x})^2
0–2111−6.5843.296443.2964
3–56424−3.5812.816476.8984
6–810770−0.580.33643.3640
9–11710702.425.856440.9948
12–1401305.4229.37640
15–17216328.4270.8964141.7928
SUM26197306.3464

Every row shares the same estimated mean, 7.58, and the last column is the number the standard-deviation formula actually uses.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Example 2.7.3 — worked through

Estimated mean, then estimated spread

Estimated mean

xˉ=ΣfmΣf=197267.58\bar{x}=\frac{\Sigma f m}{\Sigma f}=\frac{197}{26}\approx7.58

Sample standard deviation

sx=306.3464261=12.25393.50s_x=\sqrt{\frac{306.3464}{26-1}}=\sqrt{12.2539}\approx3.50

The 12–14 class contributes nothing to the total — its frequency is zero — even though its midpoint sits well away from the mean.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Try it in rāSHio

Every column, done for you

Enter the six midpoints and their frequencies, then use Graph → Frequency Table to check the pairing before running Stats → Summary Statistics.

The products, the deviations, the squares — all built automatically, which frees your attention for the part that actually needs judgement: whether the midpoints are a fair stand-in for the values you cannot see.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Figure 2.7.9 — Graph → Frequency Table

Midpoints paired with frequencies

Pairing each midpoint with its frequency is the one step a frequency-table problem adds — get that right and Summary Statistics does the rest.

The estimated mean and standard deviation this panel reports match Table 2.7.4's hand calculation exactly.

Figure 2.7.9: turning a grouped frequency table into summary statistics in rāSHio.

2.7

§2.7.4 — comparing numbers that live on different scales

A 77 out of 100 and a 2.85 out of 4 are not on the same scale, and neither are two swim times from teams of different quality. Comparing the raw values directly can be misleading.

Stop comparing the values. Compare their positions instead.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.4 — a shared scale, measured in standard deviations

z-score

Definition 2.7.6 — z-score

The number of standard deviations a value lies from its mean is its z-score, zz. A positive zz is above the mean, a negative zz is below it, and z=0z=0 means the value equals the mean.

Figure: two incompatible scales drop onto one shared z-axis.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.4 — the formulas, side by side

Value from a z-score, and back again

Data setValue from a z-scorez-score from a value
Samplex=xˉ+zsx = \bar{x} + z sz=xxˉsz = \dfrac{x - \bar{x}}{s}
Populationx=μ+zσx = \mu + z \sigmaz=xμσz = \dfrac{x - \mu}{\sigma}

Table: the sample and population forms, for quick reference.

Watch the signs, and which direction counts as better in context — a higher GPA wins with a higher z-score, but a faster race time wins with a more negative one. The arithmetic does not know which you meant.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Your turn — two swimmers, two teams

Try It Now 2.7.5

Try It Now 2.7.5 — Table 2.7.5, 50 meter freestyle

SwimmerTime (s)Team MeanTeam SD
Drew26.227.20.8
Tomás27.330.11.4

Tomás swam faster, relative to his team

zDrew=1.25z_{\text{Drew}}=-1.25, zTomaˊs=2.0z_{\text{Tomás}}=-2.0 — lower is better for a race time, so the more negative z-score wins, even though Drew's raw time was quicker.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Worked example — two GPAs, two schools

Example 2.7.4 · Which Student Has the Better GPA?

Example 2.7.4 — Table 2.7.6

StudentGPASchool MeanSchool SD
Mei Lin2.853.00.7
Hannah778010

Mei Lin has the better GPA, relative to her school

zMei Lin0.21z_{\text{Mei Lin}}\approx-0.21, zHannah=0.3z_{\text{Hannah}}=-0.3 — both are below their school's mean, but 0.21-0.21 is higher than 0.3-0.3, and higher is better for a GPA.

2.7

§2.7.5 — how much is close?

The two-standard-deviation rule of thumb from the start of this section can be made sharper — one rule that holds for any data, and a stronger one that holds only when the shape is bell-shaped and symmetric.

Use the wrong rule and your conclusion is wrong — the shape is not a footnote, it is a precondition.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.5 — two rules, two guarantees

Chebyshev's Rule and the Empirical Rule

Chebyshev's Rule — any distribution

At least 75% within two standard deviations.
At least 89% within three.
At least 95% within 4.5.

Empirical Rule — bell-shaped & symmetric

About 68% within one standard deviation.
About 95% within two.
More than 99% within three.

Chebyshev never requires you to know the shape; the Empirical Rule is far tighter, but only earns its keep once you have confirmed the shape really is bell-shaped and symmetric.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7.5 — two habits worth keeping

Screen for outliers, then draw before you compute

Two outlier screens

A value more than 1.5×IQR1.5\times\text{IQR} beyond Q1Q_1 or Q3Q_3 — or a value more than two standard deviations from the mean. Neither is a test; each is a prompt to look harder.

Picture first, z-score second

Sketch the curve, mark the mean, and shade the region before computing anything. Convert to a z-score second — now you have an estimate to check the exact answer against.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Your turn — same numbers, different shape

Try It Now 2.7.6

Try It Now 2.7.6 — a standardized test, mean 500, SD 100

(a) If the score distribution is bell-shaped and symmetric, about what percentage of test-takers score between 300 and 700? (b) If a different test has the same mean and SD but a strongly skewed distribution, what is the most you can say?

About 95% (bell-shaped); at least 75% (skewed)

300 and 700 are both exactly two standard deviations from 500. The Empirical Rule applies only to the bell-shaped case; the skewed case falls back to Chebyshev's weaker guarantee.

Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

Key Terminology — the ten terms this section defined

The vocabulary

Spread, one number at a time

standard deviation — distance from the mean, in the data's own units; ss for a sample, σ\sigma for a population.
deviationxxˉx-\bar{x} or xμx-\mu, the signed distance for one value.
variance — the average of the squared deviations, s2s^2 or σ2\sigma^2.
variation / variability — the general term for how much data values differ from one another.

Sampling and comparison

sampling variability of a statistic — how much a statistic changes from sample to sample.
standard error of the meanσ/n\sigma/\sqrt{n}, the SD of the sampling distribution of the mean.
z-score — the number of standard deviations a value lies from its mean.
Chebyshev's Rule / Empirical Rule — the any-distribution and bell-shaped guarantees for how much data falls near the mean.

2.7

The headline result of §2.7

A z-score puts any value from any data set on the same scale.

z=xxˉsorz=xμσz=\frac{x-\bar{x}}{s}\qquad\text{or}\qquad z=\frac{x-\mu}{\sigma}

Two numbers measured in different units, on different scales, with different amounts of spread become directly comparable the moment you ask the same question of both: how many standard deviations from home?

The Empirical Rule turns that scale into a percentage — about 68% of a bell-shaped data set sits within one standard deviation of the mean, about 95% within two.

2.7
Measures of the Spread of the Data · bookSHelf Intro Stats§2.7

§2.7 — conclusions

What §2.7 leaves you with

The core idea

The standard deviation turns a mean into a full description: how far the data typically stray, and how far any one value sits. Squaring removes the sign, dividing by n1n-1 or NN picks sample or population, and the square root returns the answer to the data's own units.

The failure case

A single standard deviation cannot describe a skewed distribution the way it describes a symmetric one — the two sides spread unevenly, and no one number captures both. Graph the data before you trust what the arithmetic says.

Next: §2.8 — Descriptive Statistics, the chapter's wrap-up and review.