Introduction to Statistics · Chapter 2 · Descriptive Statistics
Quartiles, percentiles, and the interquartile range — three ways to say where a value sits inside an ordered list, and the sentence that turns a number into an interpretation.
bookSHelf · Introduction to Statistics · §2.3 · a self-paced section
Learning objectives — by the end of this section you will be able to
§2.3.1 — three ways to describe the middle
The median splits ordered data exactly in half. Quartiles split it into quarters. Percentiles split it into a hundred equal parts — and quartiles turn out to be nothing more than the percentiles everyone already reaches for by name.
Every measure in this section starts the same way: put the data in order first.
§2.3.1 — the middle of an ordered list
Definition 2.3.1 — Median
The median is the number that separates ordered data into halves. Half of the values are the same number or smaller than the median, and half are the same number or larger. The median measures the "center" of the data, but it does not have to be one of the observed values.
Figure: the median splits an ordered list in half — not necessarily a value in the list.
§2.3.1 — finding the median by hand
The idea — ordered from smallest to largest
1; 1; 2; 2; 4; 6; 6.8; | 7.2; 8; 8.3; 9; 10; 10; 11.5
Median = 7
With 14 observations, the median sits between the 7th value (6.8) and the 8th (7.2): 26.8+7.2=214=7. Half the values are smaller than seven and half are larger — and seven is not itself in the list. That is allowed: the median marks a place on the number line, not a member of the data.
§2.3.1 — three cuts, not one
Definition 2.3.2 — Quartiles
Quartiles are the numbers that separate ordered data into quarters: Q1, Q2, Q3.
About one-fourth of the data falls at or below Q1; about half falls at or below Q2 — the median; about three-fourths falls at or below Q3.
Figure: take the median three times — once whole, once per half.
§2.3.1 — take the median of each half
Lower half
1; 1; 2; 2; 4; 6; 6.8 → Q1=2
One-fourth of the values are two or less. Here the quartile is one of the data values.
Upper half
7.2; 8; 8.3; 9; 10; 10; 11.5 → Q3=9
Three-fourths of the data is less than nine, one-fourth is greater.
The median, Q2, was already seven. Take the median of the lower half for Q1, the median of the upper half for Q3 — the median, applied three times.
§2.3.1 — a hundred equal parts
Definition 2.3.3 — Percentile
Percentiles divide ordered data into 100 equal parts. The kth percentile is the value at or below which k percent of the data falls. Percentiles may or may not be part of the data.
Figure: a percentile is a position in the ranked crowd.
Quartiles are just the percentiles used most often: Q1 is the 25th percentile, the median is the 50th, and Q3 is the 75th. Percentiles are mostly used with very large populations — that is why "less than your score" is close enough to "the same as or less than."
Context Pause — a percentile is a rank, not a grade
A percentile is a rank, not a grade.
Scoring in the 90th percentile does not mean you got 90% on the test. It means 90% of scores were the same as or lower than yours. You could have answered half the questions wrong and still land there, if everyone else did worse.
Your turn — order it first
Try It Now 2.3.1 — eleven commute times
Quinn asked eleven classmates how many minutes they spent commuting to campus: 24; 8; 40; 15; 8; 32; 12; 55; 20; 18; 30. Find the median, Q1, and Q3.
Median = 20, Q1=12, Q3=32 minutes.
Ordered: 8; 8; 12; 15; 18; 20; 24; 30; 32; 40; 55. With 11 values the median is the 6th. The lower half (8, 8, 12, 15, 18) has middle value 12; the upper half (24, 30, 32, 40, 55) has middle value 32. A quarter of the class commutes 12 minutes or less; a quarter commutes 32 or more.
§2.3.2 — how wide is the middle?
Knowing where the middle of the data sits is useful. Knowing how wide that middle is tells you something the median alone cannot — and it hands you a rule for flagging values that do not fit.
The middle 50% ignores everything outside it — that is the whole point.
§2.3.2 — measuring the spread of the middle half
Definition 2.3.4 — Interquartile Range
The interquartile range (IQR) indicates the spread of the middle 50% of the data.
IQR=Q3−Q1Figure: only the middle half — the extremes cannot inflate it.
Because the IQR ignores everything outside the middle 50%, a single wild value at either end cannot inflate it. That is what makes the next definition possible.
§2.3.2 — the 1.5 × IQR rule
Definition 2.3.5 — Potential Outlier
A value is a potential outlier if it falls more than 1.5×IQR below Q1 or above Q3 — outside the interval
[Q1−1.5(IQR), Q3+1.5(IQR)]Figure: fences step 1.5 × IQR out from each quartile.
The two boundary numbers are called the fences. "Potential" is the operative word — the rule flags candidates, it does not convict them. Every outlier requires further investigation.
Insight Note — the fences are a metal detector, not a verdict
The fences are a metal detector, not a verdict.
It beeps at anything unusual. Sometimes that is a nail in your shoe, sometimes it is buried treasure — but you always dig.
Your turn — build the fences
Try It Now 2.3.2 — eleven salaries
$33,000; $64,500; $28,000; $54,000; $72,000; $68,500; $69,000; $42,000; $54,000; $120,000; $40,500. Find the IQR and any outliers.
IQR=$28,500; $120,000 is a potential outlier.
Ordered, the median is $54,000, Q1=$40,500, Q3=$69,000. The upper fence is 69,000+1.5(28,500)=$111,750 — and $120,000 exceeds it. No salary falls below the lower fence.
Worked example — a house that does not belong
Example 2.3.1 — thirteen real estate prices (dollars)
389,950; 230,500; 158,000; 479,000; 639,000; 114,950; 5,500,000; 387,000; 659,000; 529,000; 575,000; 488,800; 1,095,000. Calculate the IQR and determine if any price is a potential outlier.
Ordered, the median (7th of 13) is $488,800. Q1 averages the 3rd and 4th of the lower six; Q3 averages the 3rd and 4th of the upper six.
Example 2.3.1 — worked through
Quartiles and IQR
Q1=2230,500+387,000=$308,750
Q3=2639,000+659,000=$649,000
IQR=649,000−308,750=$340,250
Fences and the verdict
Upper fence: 649,000+1.5(340,250)=$1,159,375. $5,500,000 is well above it — a potential outlier. $1,095,000, the second-priciest house, sits just under the fence and is not flagged.
Try it in rāSHio
Paste the thirteen house prices into File → Delimited List…, then choose Stats → Summary Statistics. The quartiles and IQR come back in one panel — $308,750, $649,000, $340,250.
Spend the arithmetic the tool saves you on the part it will not do: deciding what to make of that $5,500,000.
Figure 2.3.1 — Stats → Summary Statistics
Load the column, open Summary Statistics, and the quartiles, IQR, and five-number summary all arrive at once.
Use it to check work done by hand, not to skip it — the tool cannot tell you which flagged value is a typo and which is real.
Figure 2.3.1: reading quartiles and the IQR in rāSHio.
Your turn — comparing spread, not center
Try It Now 2.3.3 — two study groups, 20 scores each
Marisol tutors two groups and wants to know which is more spread out. Find the IQR for Class A and Class B and compare.
IQRA=18, IQRB=21.
Both classes share Q1=72.5, but Class B's middle half reaches three points higher — Class B's scores are slightly more spread out through the middle.
Worked example — day class versus night class
| Class | Minimum | Q1 | Median | Q3 | Maximum |
|---|---|---|---|---|---|
| Day | 32 | 56 | 74.5 | 82.5 | 99 |
| Night | 25.5 | 78 | 81 | 89 | 98 |
Table 2.3.1: five-number summaries for the day and night classes.
Find the IQR for each class and compare, then check both for outliers using the fences.
Example 2.3.2 — worked through
IQR comparison
IQRday=82.5−56=26.5
IQRnight=89−78=11
The day class is more than twice as spread out.
Outliers
Day fences: [16.25,122.25] — no outliers. Night fences: [61.5,105.5] — 45 and 25.5 are outliers.
Worth sitting with: the more consistent night class is the one that produced outliers, precisely because its narrow IQR makes narrow fences.
Try it in rāSHio
Put the day scores in one column and the evening scores in another, then choose Graph → Box Plot. Each box is the five-number summary — the wider box is the larger IQR, and the outliers plot as their own points.
This is the picture §2.4 builds by hand.
Figure 2.3.2 — Graph → Box Plot
Each box spans Q1 to Q3; the whiskers reach the non-outlier extremes, and the outliers plot separately.
The night class's narrower box and its two lone points make the whole Example 2.3.2 result visible at a glance.
Figure 2.3.2: comparing two five-number summaries in rāSHio.
§2.3.3 — you will not always get a raw list
Often the data arrives already summarized in a frequency table — and the cumulative relative frequency column is a percentile lookup table hiding in plain sight.
Each row already tells you what fraction of the data sits at or below it.
Your turn — read the cumulative column
| Hours on route | Freq. | Rel. freq. | Cum. rel. freq. |
|---|---|---|---|
| 2 | 12 | 0.30 | 0.30 |
| 3 | 14 | 0.35 | 0.65 |
| 4 | 10 | 0.25 | 0.90 |
| 5 | 4 | 0.10 | 1.00 |
Table 2.3.2: time on route per day, 40 bus drivers.
Try It Now 2.3.4 — the question
Cody asked 40 bus drivers how many hours they spend on route. Find the 65th percentile.
3.5 hours
0.65 lands exactly on the "3 hours" row — 26 of 40 values. The percentile falls between the 26th value (3) and the 27th (4): 23+4=3.5.
Worked example — three lookups, one table
| Hours of sleep | Freq. | Rel. freq. | Cum. rel. freq. |
|---|---|---|---|
| 4 | 2 | 0.04 | 0.04 |
| 5 | 5 | 0.10 | 0.14 |
| 6 | 7 | 0.14 | 0.28 |
| 7 | 12 | 0.24 | 0.52 |
| 8 | 14 | 0.28 | 0.80 |
| 9 | 7 | 0.14 | 0.94 |
| 10 | 3 | 0.06 | 1.00 |
Table 2.3.3: hours of sleep per school night, 50 students.
P28 = 6.5h, Median = 7h, Q3 = 8h
0.28 lands on "6 hours" — the boundary between the last 6 and first 7 gives 6.5h. 0.52 lands on "7 hours" the same way, giving 7h. The column jumps 0.52 → 0.80 crossing "8 hours," so Q3=8 directly.
Try it in rāSHio
Enter the fifty sleep answers, then choose Graph → Frequency Table with Discrete values checked. The cumulative relative frequency column you read 0.28, 0.52, and 0.80 off is built for you.
That column is the whole trick of this subsection — a percentile lookup table hiding in plain sight.
Figure 2.3.3 — Graph → Frequency Table
One row per distinct value, with counts, shares, and the running total already filled in.
Use it to check hand work — the column only means something once you know what it is counting.
Figure 2.3.3: building the cumulative relative frequency column in rāSHio.
§2.3.4 — when the percent you want doesn't land on a row
Eyeballing a cumulative column works when the percent you want happens to line up with a row. When it doesn't, you need arithmetic.
Read the formula as counting instructions, not algebra to solve.
§2.3.4 — a position, then a walk down the list
Definition 2.3.6 — The kth Percentile by Index
Order the data, then compute the index
i=100k(n+1)Integer i: the percentile is the value at position i. Non-integer i: round down and up, and average those two values.
Figure: a whole index lands on one value, a fractional index between two.
Your turn — one integer index, one fractional
Try It Now 2.3.5 — 29 ages of Academy Award winning actors
18; 21; 22; 25; 26; 27; 29; 30; 31; 33; 36; 37; 41; 42; 47; 52; 55; 57; 58; 62; 64; 67; 69; 71; 72; 73; 74; 76; 77. Find the 20th and 55th percentiles.
P20=27, P55=53.5 years.
n+1=30. For 20%: i=10020(30)=6 — the 6th value is 27. For 55%: i=10055(30)=16.5 — average the 16th (52) and 17th (55): 252+55=53.5.
Context Pause — you can hand this arithmetic off
You can hand this arithmetic off.
Percentiles are one of the first things any calculator, spreadsheet, or online tool will compute for you. Learn the index formula anyway — knowing what the tool is doing is what lets you catch it when it disagrees with you.
Worked example — same 29 ages, two more percentiles
Example 2.3.4 — using the same ordered list of 29 ages
Find the 70th percentile and the 83rd percentile.
P70=64, P83=71.5 years.
n+1=30. i=10070(30)=21 — an integer, so the 21st value, 64. i=10083(30)=24.9 — average the 24th (71) and 25th (72) values: 271+72=71.5.
Your turn — the formula works on a frequency table too
Try It Now 2.3.6 — back to Table 2.3.2 (bus route hours)
Chayton needs the third quartile of the route-hours data. Find it, and give another name for Q3.
Q3=4 hours — the 75th percentile.
n=40, so i=10075(41)=30.75. Counting down the frequency column, both the 30th and 31st values fall in the 4-hour block: 24+4=4.
In class — build the table from your own data
Collaborative Exercise
Try it in rāSHio
Use File → Delimited List… to paste the class's sweater counts straight in as you collect them, rather than retyping cell by cell.
Once the column is loaded, the median, Q1, and Q3 that the exercise asks for are one click away under Stats → Summary Statistics.
Figure 2.3.4 — File → Delimited List…
A semicolon-separated list parses as-is — no retyping cell by cell as data comes in.
The same move works for any list this section hands you, not just class survey data.
Figure 2.3.4: getting collected data into rāSHio.
Worked example — three more lookups from Table 2.3.3
Example 2.3.5 — using Table 2.3.3 (n=50)
Find the 80th percentile, the 90th percentile, and the first quartile.
P80=8.5h, P90=9h, Q1=6h.
n+1=51. i=10080(51)=40.8 → average the 40th (8) and 41st (9): 8.5h. i=10090(51)=45.9 → the 45th and 46th are both 9. Q1 is the 25th percentile: i=10025(51)=12.75 → the 12th and 13th are both 6.
§2.3.5 — running the question backwards
So far you started with a percent and asked "which value sits there?" Now start with a value and ask for its percentile — the direction that matters when someone tells you their score.
Ties get split down the middle, not counted twice.
§2.3.5 — from a value to its percentile
Definition 2.3.7 — The Percentile of a Data Value
Let x = values below the target, y = values tied with it, n = total. Calculate
nx+0.5y(100)…then round to the nearest integer.
Figure: below counts in full, tied counts half.
The 0.5y term is the piece worth pausing on: if three people tie your exact score, splitting the tie down the middle is the fair compromise.
Your turn — one value has a tie
Try It Now 2.3.7 — 30 ages, ordered, with a repeated 31
18; 21; 22; 25; 26; 27; 29; 30; 31; 31; 33; 36; 37; 41; 42; 47; 52; 55; 57; 58; 62; 64; 67; 69; 71; 72; 73; 74; 76; 77. Find the percentiles for 47 and 31.
47 is the 52nd percentile; 31 is the 30th.
For 47: x=15,y=1, 3015.5(100)=51.67→52. For 31 — the tied value: x=8,y=2, 309(100)=30.
Worked example — no ties this time
Example 2.3.6 — the same 29 ages as Try It Now 2.3.5
Find the percentile for 58, and the percentile for 25.
58 is the 64th percentile; 25 is the 12th.
For 58: x=18,y=1, 2918.5(100)=63.8→64. For 25: x=3,y=1, 293.5(100)=12.07→12.
§2.3.6 — turning a number into a sentence
A 90th-percentile finishing time in a race means you were slower than nearly everyone. A 90th-percentile exam score means the opposite. The arithmetic is identical; only the context tells you whether to celebrate.
Your turn — a low time is a fast run
Try It Now 2.3.8 — the 100-meter dash
The third quartile for finishing times was 11.5 seconds. Interpret it.
75% of runners finished in 11.5 seconds or less; 25% finished in 11.5 seconds or more. A low time is fast, so a runner exactly at Q3 was slower than three-quarters of the field.
Worked example — finishing quickly is the goal
Example 2.3.7 — a timed math test
The first quartile for time to finish was 35 minutes. Interpret it.
25% of students finished in 35 minutes or less; 75% finished in 35 or more. A low percentile is good here — finishing quickly on a timed exam is desirable.
Your turn — more points is better
Try It Now 2.3.9 — a 60-point written assignment
The 80th percentile for points earned was 49. Interpret it.
80% of students earned 49 points or fewer; 20% earned 49 or more. A high percentile is desirable — sitting there means you scored at or above four out of every five classmates.
Worked example — correct answers, not time
Example 2.3.8 — a 20-question math test
The 70th percentile for correct answers was 16. Interpret it.
70% of students answered 16 or fewer correctly; 30% answered 16 or more. A high percentile is desirable — that student did better than about 70% of the class.
Your turn — the value judgment depends on the role
Try It Now 2.3.10 — a basketball league
The 40th percentile for points scored per game is eight. Interpret it.
40% of players scored 8 points or fewer; 60% scored 8 or more. Higher scoring generally reads as better — though a player whose job is defense may sit low here and still excel at their role.
Worked example — sometimes no value judgment applies
Example 2.3.9 — enrollment credit units
The 30th percentile of enrolled credit units is seven. Interpret it.
30% of students are enrolled in 7 units or fewer; 70% in 7 or more. No value judgment applies — a light load may be deliberate (work, family, nearly finished). The percentile describes enrollment, not performance.
Your turn — a five-number summary decides a policy question
Try It Now 2.3.11 — a final-project time study, 10 students
2; 3; 5; 3; 4; 4; 3; 11; 3; 2 hours. The instructor wants a typical time of 3–4 hours. Find the five-number summary. Should the project be modified?
Min 2, Q1 3, Med 3, Q3 4, Max 11 — leave it as is.
The middle half falls between Q1=3 and Q3=4 — exactly the target. The 11-hour value checks out as a potential outlier (Q3+1.5(IQR)=5.5), worth a conversation with that one student, not a redesign.
Worked example — a grant decision survives dropping the outlier
15 students' daily exercise minutes: 0; 40; 60; 30; 60; 10; 45; 30; 300; 90; 30; 120; 60; 0; 20. Determine the five-number summary — is buying fitness equipment justified?
All 15 values
Min 0, Q1 20, Med 40, Q3 60, Max 300. IQR=40; upper fence =60+1.5(40)=120. 300 is a potential outlier.
With 300 removed (n = 14)
Min 0, Q1 20, Med 35, Q3 60, Max 120. The conclusion survives: half the students exercise 20–60 minutes daily either way.
The equipment purchase is justified — but 15 students is a small sample, worth surveying more before relying on it.
Your turn — a trick question, on purpose
Try It Now 2.3.12 — Mateo's SAT score
Mateo scored at the 72nd percentile on the SAT. What was his SAT score?
It cannot be determined from the percentile alone.
A percentile is a position, not a value. Knowing Mateo sits at the 72nd percentile says 72% scored the same or lower — converting that back into a number needs the full distribution of scores, which the percentile alone does not carry.
Key Terminology — the eight terms this section defined
Location in the data
median — separates ordered data into halves; the second quartile, Q2, or 50th percentile.
quartile — Q1, Q2, Q3: the numbers separating ordered data into quarters.
first quartile Q1 — middle of the lower half; the 25th percentile.
third quartile Q3 — middle of the upper half; the 75th percentile.
percentile — a value at or below which a stated percent of the data falls.
Spread and position
index i — position in the ordered list, i=100k(n+1) for the kth percentile.
interquartile range (IQR) — spread of the middle 50%, IQR=Q3−Q1.
potential outlier — a value more than 1.5×IQR beyond Q1 or Q3; requires further investigation.
five-number summary — minimum, Q1, median, Q3, and maximum.
The headline result of §2.3
A value is a potential outlier once it steps 1.5 × IQR past either quartile.
The fences [Q1−1.5(IQR), Q3+1.5(IQR)] come entirely from the middle 50% of the data, so a single extreme value can never move its own fence.
Every quartile, percentile, and interpretation sentence in this section answers the same underlying question: where does a value sit inside the ordered list, and does that position deserve a second look?
† "Potential" is doing real work in that name — the rule flags candidates for investigation, it does not convict them. A typo gets deleted; a genuine mansion in a neighborhood of starter homes gets kept and discussed.
§2.3 — conclusions
The core idea
Order the data first, always. The median, quartiles, and percentiles all locate a position inside that order; the index formula converts a percent into a position and back again; the IQR and its fences measure — and police — the spread of the middle half.
The failure case
The arithmetic never tells you whether a percentile is good news. A 90th-percentile finish time and a 90th-percentile exam score use the identical formula and mean opposite things — the interpretation sentence is not optional decoration, it is the answer.
Next: §2.4 — Box Plots, where the five-number summary this section computed by hand becomes a picture you can compare at a glance.