Introduction to Statistics · Chapter 2 · Descriptive Statistics
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
Learning objectives — by the end of this section you will be able to
§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.
§2.7.1 — a number that measures spread
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.
§2.7.1 — same mean, different spread
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.
§2.7.1 — counting standard deviations on a line
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)=7 — one standard deviation above the mean.
Binh: 5+(−2)(2)=1 — two standard deviations below the mean.
Figure 2.7.1: counting standard deviations on a number line.
§2.7.1 — the equation behind the counting
#ofSTDEVs does not have to be a whole number — 1.5 standard deviations above the mean is perfectly ordinary.
s and xˉ describe a sample; σ and μ describe a whole population — same idea, different alphabet.
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.
Your turn — count the standard deviations
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 33−24=9 minutes over, and 9/3=3 standard deviations. Two standard deviations below the mean: 24+(−2)(3)=18 minutes.
§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.
§2.7.2 — the signed distance to the mean
Definition 2.7.2 — Deviation
If x is a data value, the difference x−mean is its deviation: x−μ for population data, x−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.
§2.7.2 — squaring away the sign
Definition 2.7.3 — Variance
The variance is the average of the squared deviations — σ2 for a population, s2 for a sample. The standard deviation is its square root: σ=σ2, s=s2.
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.
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.
§2.7.2 — what to divide by
Sample
s=n−1Σ(x−xˉ)2ors=n−1Σf(x−xˉ)2Divide by n−1, one less than the sample size.
Population
σ=NΣ(x−μ)2orσ=NΣf(x−μ)2Divide by N, the full population count.
f 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.
§2.7.2 — how much a statistic wobbles
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.
§2.7.2 — the wobble in the mean, specifically
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σ
σ = population standard deviation, n = sample size
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 and sx, and picking the population value for sample data is a real mistake, not a rounding difference.
Your turn — mean and standard deviation from a list
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, s≈6.09 years
Two standard deviations above the mean: 30.68+(2)(6.09)=42.86 — older than every player on the roster, so nobody here is unusually old for the team.
Worked example — twenty ages, one table
Example 2.7.1 — twenty ages (n=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) — the sample form of the equation from §2.7.1.
Example 2.7.1 — building the variance, column by column
| Data x | Freq. f | Deviation (x−xˉ) | (x−xˉ)2 | f(x−xˉ)2 |
|---|---|---|---|---|
| 9 | 1 | 9 − 10.525 = −1.525 | 2.325625 | 2.325625 |
| 9.5 | 2 | 9.5 − 10.525 = −1.025 | 1.050625 | 2.101250 |
| 10 | 4 | 10 − 10.525 = −0.525 | 0.275625 | 1.102500 |
| 10.5 | 4 | 10.5 − 10.525 = −0.025 | 0.000625 | 0.002500 |
| 11 | 6 | 11 − 10.525 = 0.475 | 0.225625 | 1.353750 |
| 11.5 | 3 | 11.5 − 10.525 = 0.975 | 0.950625 | 2.851875 |
| Total | 20 | 9.7375 |
Square each deviation, multiply by how often it occurs, and total the column — that total feeds directly into the variance formula.
Example 2.7.1 — worked through
Mean, variance, SD
xˉ=20210.5=10.53
s2=20−19.7375=0.5125
s=0.5125≈0.72
Parts b–d
xˉ+1s=10.53+(1)(0.72)=11.25
xˉ−2s=10.53−(2)(0.72)=9.09
xˉ−1.5s=9.45, 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.
Try it in rāSHio
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.
Figure 2.7.2 — Stats → Summary Statistics
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.
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 s or σ grows — and a single outlier can make it very large.
Your turn — pet-food counts at 29 stores
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, s≈2.2 types
A store carrying 5 types would sit just under two standard deviations below the mean — close to the borderline for unusual.
Worked example — 31 exam scores, three views
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.
Example 2.7.2 — the numbers, from 1-VarStats
Center and spread
xˉ=73.5
s=17.9
median =73
Quartiles and IQR
Q1=61
Q3=90
IQR=90−61=29
Every value is rounded to one decimal place, straight off the calculator's 1-VarStats screen.
Figure 2.7.3 — a box plot and a histogram, one axis
Figure 2.7.3: the box plot and histogram of the exam scores, on one set of axes.
Example 2.7.2 — what the graphs say
Lower half spans 40 points; upper half spans 27
73−33=40 below the median, 100−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.
Try it in rāSHio
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.
Figure 2.7.4 — Graph → Box Plot
The five-number summary — minimum, Q1, median, Q3, 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.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.
f is the interval frequency, m is the interval midpoint.
Your turn — the same idea, from a calculator
Try It Now 2.7.4 — Table 2.7.3, midpoints 1, 4, 7, 10, 13, 16
| Class | Frequency f |
|---|---|
| 0–2 | 1 |
| 3–5 | 6 |
| 6–8 | 10 |
| 9–11 | 7 |
| 12–14 | 0 |
| 15–17 | 2 |
sx≈3.50
The 1-VarStats screen reports both σx=3.4326 and sx=3.5005 — these are sample data, so sx is the answer, matching the table method exactly.
Worked example — the full seven-column table
| Class | f | m | fm | m−xˉ | (m−xˉ)2 | f(m−xˉ)2 |
|---|---|---|---|---|---|---|
| 0–2 | 1 | 1 | 1 | −6.58 | 43.2964 | 43.2964 |
| 3–5 | 6 | 4 | 24 | −3.58 | 12.8164 | 76.8984 |
| 6–8 | 10 | 7 | 70 | −0.58 | 0.3364 | 3.3640 |
| 9–11 | 7 | 10 | 70 | 2.42 | 5.8564 | 40.9948 |
| 12–14 | 0 | 13 | 0 | 5.42 | 29.3764 | 0 |
| 15–17 | 2 | 16 | 32 | 8.42 | 70.8964 | 141.7928 |
| SUM | 26 | 197 | 306.3464 |
Every row shares the same estimated mean, 7.58, and the last column is the number the standard-deviation formula actually uses.
Example 2.7.3 — worked through
Estimated mean
xˉ=ΣfΣfm=26197≈7.58Sample standard deviation
sx=26−1306.3464=12.2539≈3.50The 12–14 class contributes nothing to the total — its frequency is zero — even though its midpoint sits well away from the mean.
Try it in rāSHio
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.
Figure 2.7.9 — Graph → Frequency Table
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.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.
§2.7.4 — a shared scale, measured in standard deviations
Definition 2.7.6 — z-score
The number of standard deviations a value lies from its mean is its z-score, z. A positive z is above the mean, a negative z is below it, and z=0 means the value equals the mean.
Figure: two incompatible scales drop onto one shared z-axis.
§2.7.4 — the formulas, side by side
| Data set | Value from a z-score | z-score from a value |
|---|---|---|
| Sample | x=xˉ+zs | z=sx−xˉ |
| Population | x=μ+zσ | z=σx−μ |
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.
Your turn — two swimmers, two teams
Try It Now 2.7.5 — Table 2.7.5, 50 meter freestyle
| Swimmer | Time (s) | Team Mean | Team SD |
|---|---|---|---|
| Drew | 26.2 | 27.2 | 0.8 |
| Tomás | 27.3 | 30.1 | 1.4 |
Tomás swam faster, relative to his team
zDrew=−1.25, zTomaˊ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.
Worked example — two GPAs, two schools
Example 2.7.4 — Table 2.7.6
| Student | GPA | School Mean | School SD |
|---|---|---|---|
| Mei Lin | 2.85 | 3.0 | 0.7 |
| Hannah | 77 | 80 | 10 |
Mei Lin has the better GPA, relative to her school
zMei Lin≈−0.21, zHannah=−0.3 — both are below their school's mean, but −0.21 is higher than −0.3, and higher is better for a GPA.
§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.
§2.7.5 — two rules, two guarantees
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.
§2.7.5 — two habits worth keeping
Two outlier screens
A value more than 1.5×IQR beyond Q1 or Q3 — 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.
Your turn — same numbers, different shape
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.
Key Terminology — the ten terms this section defined
Spread, one number at a time
standard deviation — distance from the mean, in the data's own units; s for a sample, σ for a population.
deviation — x−xˉ or x−μ, the signed distance for one value.
variance — the average of the squared deviations, s2 or σ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, 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.
The headline result of §2.7
A z-score puts any value from any data set on the same scale.
z=sx−xˉorz=σx−μ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 — conclusions
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 n−1 or N 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.