Skip to content
๐ŸŽฏโญ INTERACTIVE LESSON

Outliers in Data

Learn step-by-step with interactive practice!

Outliers in Data - Complete Interactive Lesson

Part 1: What Is an Outlier?

๐ŸŽฏ Outliers in Data

Part 1 of 5 โ€” What Is an Outlier?


Topics in This Part

Section
The Idea of an Outlier
Spotting Outliers by Eye
Why a Single Value Can Mislead

๐Ÿ”‘ Key Concept: An outlier is a data value that lies unusually far from the rest of the data. One stray value can quietly distort an average, stretch a graph, and lead to wrong conclusions โ€” so learning to spot and handle outliers is a core data skill.

The Idea of an Outlier

Imagine seven students report how many minutes it took them to get to school:

12,โ€…โ€Š14,โ€…โ€Š15,โ€…โ€Š16,โ€…โ€Š18,โ€…โ€Š19,โ€…โ€Š4712,\; 14,\; 15,\; 16,\; 18,\; 19,\; 47

Six of the values huddle between 1212 and 1919 minutes. Then there's a 4747 โ€” more than double the next-largest value. That lonely 4747 is an outlier: a value that doesn't fit the pattern of the rest.

Outliers can be:

  • Real and important โ€” maybe that student walked from across town, or a sensor caught a genuine spike.
  • Mistakes โ€” a typo (4747 instead of 1717), a broken instrument, or the wrong units.

๐Ÿ’ก An outlier is not automatically "bad data." It is simply a value worth a second look. The job of statistics is to flag it; the job of a thoughtful person is to investigate why it's there.

Concept Check ๐ŸŽฏ

Why a Single Value Can Mislead

Return to the commute times. Their mean (average) is:

12+14+15+16+18+19+477=1417โ‰ˆ20.1ย minutes\frac{12+14+15+16+18+19+47}{7} = \frac{141}{7} \approx 20.1 \text{ minutes}

But look โ€” six of the seven students got to school in under 2020 minutes! The "average" of 20.120.1 is larger than almost every actual value, all because of one 4747.

If we set the outlier aside, the other six average:

12+14+15+16+18+196=946โ‰ˆ15.7ย minutes\frac{12+14+15+16+18+19}{6} = \frac{94}{6} \approx 15.7 \text{ minutes}

That 15.715.7 is a far more honest summary of a typical commute.

โš ๏ธ The mean is pulled toward outliers. A single extreme value can drag the average up or down until it no longer represents the group. We will study this "tug-of-war" carefully in Part 4.

See the Pull ๐Ÿงฎ

A small shop records the ages of 55 customers:

19,โ€…โ€Š21,โ€…โ€Š22,โ€…โ€Š24,โ€…โ€Š6419,\; 21,\; 22,\; 24,\; 64

1) Mean of all five ages =โ€‰?= \,? (it divides evenly) 2) Mean of just the first four ages โ€…โ€Š19,21,22,24โ€…โ€Š\;19, 21, 22, 24\; (the outlier removed) =โ€‰?= \,?

Spotting by Eye Is Not Enough

In the examples above, the outliers were obvious. But what about a value that is somewhat large โ€” is 3232 an outlier in a data set that runs 1010 to 2828? Eyeballing it is risky and subjective.

We need an objective rule that any two people would apply the same way. There are two standard ones:

RuleIdea
1.5ร—IQR1.5 \times \text{IQR} ruleflag values too far outside the middle half (Part 2)
Standard-deviation ruleflag values more than 22 (or 33) standard deviations from the mean (Part 3)

๐Ÿ”‘ Both rules turn the fuzzy phrase "unusually far" into a precise calculation. Part 2 tackles the most common one โ€” the 1.5ร—IQR1.5 \times \text{IQR} rule.

First Ideas ๐Ÿ”ฝ

Lock in the vocabulary from Part 1.

Part 2: The 1.5 ร— IQR Rule

๐ŸŽฏ Outliers in Data

Part 2 of 5 โ€” The 1.5ร—IQR1.5 \times \text{IQR} Rule


๐Ÿ”‘ The Idea: Measure the spread of the middle half of the data with the IQR, then build two fences. Any value beyond a fence is officially an outlier.

Step 1 โ€” Find the Quartiles and the IQR

The interquartile range (IQR) is the spread of the middle 50%50\% of the data:

IQR=Q3โˆ’Q1\text{IQR} = Q_3 - Q_1

where Q1Q_1 (the first quartile) is the median of the lower half of the sorted data and Q3Q_3 (the third quartile) is the median of the upper half.

Quick refresher

For sorted data โ€…โ€Š3,โ€‰7,โ€‰8,โ€‰12,โ€‰13,โ€‰14,โ€‰15,โ€‰16,โ€‰17,โ€‰38โ€…โ€Š\;3,\, 7,\, 8,\, 12,\, 13,\, 14,\, 15,\, 16,\, 17,\, 38\; (n=10n = 10):

  • The median is the average of the 5th5^{\text{th}} and 6th6^{\text{th}} values: 13+142=13.5\frac{13+14}{2} = 13.5.
  • Lower half {3,7,8,12,13}\{3, 7, 8, 12, 13\} โ†’ Q1=8Q_1 = 8 (the middle one).
  • Upper half {14,15,16,17,38}\{14, 15, 16, 17, 38\} โ†’ Q3=16Q_3 = 16.

IQR=Q3โˆ’Q1=16โˆ’8=8\text{IQR} = Q_3 - Q_1 = 16 - 8 = 8

๐Ÿ’ก The IQR ignores the extremes on purpose, so it is a stable measure of spread โ€” exactly what we want when hunting the extremes.

Step 2 โ€” Build the Fences

Multiply the IQR by 1.51.5 and step that far outside each quartile:

Lowerย fence=Q1โˆ’1.5โ‹…IQR\text{Lower fence} = Q_1 - 1.5 \cdot \text{IQR}

Upperย fence=Q3+1.5โ‹…IQR\text{Upper fence} = Q_3 + 1.5 \cdot \text{IQR}

๐Ÿ”‘ The rule: A value below the lower fence or above the upper fence is an outlier. Everything between the fences is ordinary.

Finishing our example

With Q1=8Q_1 = 8, Q3=16Q_3 = 16, and IQR=8\text{IQR} = 8:

Lowerย fence=8โˆ’1.5(8)=8โˆ’12=โˆ’4\text{Lower fence} = 8 - 1.5(8) = 8 - 12 = -4 Upperย fence=16+1.5(8)=16+12=28\text{Upper fence} = 16 + 1.5(8) = 16 + 12 = 28

Now scan the data โ€…โ€Š3,7,8,12,13,14,15,16,17,38\;3, 7, 8, 12, 13, 14, 15, 16, 17, 38. Is anything below โˆ’4-4 or above 2828? Only the 3838 clears the upper fence โ€” 3838 is an outlier. โœ“

โš ๏ธ A value exactly on a fence is not beyond it, so it is not flagged. Only values strictly past a fence count.

Concept Check ๐ŸŽฏ

Build the Fences ๐Ÿงฎ

Monthly rainfall (cm), sorted, with the five-number summary min =2=2, Q1=6Q_1 = 6, median =9=9, Q3=14Q_3 = 14, max =31=31.

1) IQR=Q3โˆ’Q1=โ€‰?\text{IQR} = Q_3 - Q_1 = \,? 2) Upper fence =Q3+1.5โ‹…IQR=โ€‰?= Q_3 + 1.5 \cdot \text{IQR} = \,? 3) Lower fence =Q1โˆ’1.5โ‹…IQR=โ€‰?= Q_1 - 1.5 \cdot \text{IQR} = \,?

Putting the Fences to Work

Once you have both fences, classifying every value is a simple scan: walk through the data and ask, for each one, "Is it below the lower fence or above the upper fence?"

Remember the boundary detail from the worked example:

โš ๏ธ Strictly beyond. A value has to be past a fence to count. A value sitting exactly on a fence is inside the gate, so it is not an outlier.

The drill below gives you the fences directly โ€” your only job is the verdict.

Outlier or Not? ๐Ÿ”ฝ

A data set has Q1=40Q_1 = 40 and Q3=70Q_3 = 70, so IQR=30\text{IQR} = 30. The fences are lower =40โˆ’1.5(30)=โˆ’5= 40 - 1.5(30) = -5 and upper =70+1.5(30)=115= 70 + 1.5(30) = 115. For each value, decide.

Part 3: The Standard-Deviation Rule

๐ŸŽฏ Outliers in Data

Part 3 of 5 โ€” The Standard-Deviation Rule


๐Ÿ”‘ A second test: Instead of quartiles, measure how many standard deviations a value sits from the mean. If it is more than about 22 away, it is unusually far out.

Measuring Distance in Standard Deviations

The standard deviation ฯƒ\sigma measures the typical distance of values from the mean xห‰\bar{x}. We can rewrite any value as a number of standard deviations away from the mean โ€” called its zz-score:

z=xโˆ’xห‰ฯƒz = \frac{x - \bar{x}}{\sigma}

  • z=0z = 0 means the value sits exactly at the mean.
  • z=1z = 1 means it is one standard deviation above the mean.
  • z=โˆ’2z = -2 means it is two standard deviations below the mean.

๐Ÿ”‘ The rule: A common cutoff flags a value as an outlier when its zz-score satisfies โˆฃzโˆฃ>2|z| > 2 (some textbooks use the stricter โˆฃzโˆฃ>3|z| > 3). The farther โˆฃzโˆฃ|z| is from 00, the more unusual the value.

Worked Example: Test Scores

A class has a mean score of xห‰=70\bar{x} = 70 with a standard deviation of ฯƒ=5\sigma = 5. Using the โˆฃzโˆฃ>2|z| > 2 rule, check three scores.

A score of 8282: z=82โˆ’705=125=2.4z = \frac{82 - 70}{5} = \frac{12}{5} = 2.4 Since โˆฃ2.4โˆฃ>2|2.4| > 2, the 8282 is an outlier (unusually high). โœ“

A score of 7878: z=78โˆ’705=85=1.6z = \frac{78 - 70}{5} = \frac{8}{5} = 1.6 Since โˆฃ1.6โˆฃ<2|1.6| < 2, the 7878 is not an outlier โ€” just a good score.

A score of 5858: z=58โˆ’705=โˆ’125=โˆ’2.4z = \frac{58 - 70}{5} = \frac{-12}{5} = -2.4 Since โˆฃโˆ’2.4โˆฃ>2|-2.4| > 2, the 5858 is an outlier (unusually low). โœ“

๐Ÿ’ก The zz-score is a "universal ruler." A score of 8282 might be ordinary in one class and extraordinary in another โ€” the zz-score accounts for how spread out each class actually is.

Concept Check ๐ŸŽฏ

Compute the zz-score ๐Ÿงฎ

A factory fills bottles with a mean of xห‰=500\bar{x} = 500 mL and a standard deviation of ฯƒ=8\sigma = 8 mL.

1) A bottle holds 516516 mL. Its zz-score is โ€‰?\,? 2) A bottle holds 480480 mL. Its zz-score is โ€‰?\,? 3) Using โˆฃzโˆฃ>2|z| > 2, how many of these two bottles are outliers? โ€‰?\,?

Two Rules, Side by Side

You now own two outlier tests. They usually agree, but they are built from different ingredients:

1.5ร—IQR1.5 \times \text{IQR} ruleStandard-deviation rule
Center usedmedianmean xห‰\bar{x}
Spread usedIQR (Q3โˆ’Q1Q_3 - Q_1)standard deviation ฯƒ\sigma
Outlier whenbeyond a fenceโˆฃzโˆฃ>2\vert z\vert > 2
Best whendata may be skeweddata is roughly symmetric

๐Ÿ’ก Because the IQR rule leans on the median and quartiles, it is itself resistant to outliers โ€” which is why it's the go-to for messy, skewed data. The next check makes sure you can tell the two rules apart.

Two Rules, One Goal ๐Ÿ”ฝ

Match each phrase to the rule it describes.

Part 4: How Outliers Affect Statistics

๐ŸŽฏ Outliers in Data

Part 4 of 5 โ€” How Outliers Affect Statistics


๐Ÿ”‘ Big Idea: Some statistics get yanked around by outliers and some shrug them off. Knowing which is which tells you the right numbers to report when an outlier is present.

Resistant vs. Non-Resistant

A statistic is resistant (or robust) if a single outlier barely changes it. It is non-resistant if an outlier can move it a lot.

StatisticMeasuresResistant to outliers?
MeancenterโŒ No โ€” gets pulled toward the outlier
Mediancenterโœ… Yes โ€” only the middle position matters
RangespreadโŒ No โ€” uses the very extremes
IQRspreadโœ… Yes โ€” uses only the middle half
Standard deviationspreadโŒ No โ€” squares the distance to the mean

๐Ÿ”‘ Rule of thumb: When a data set contains an outlier, report the median for center and the IQR for spread. They describe the typical value honestly.

Worked Example: Adding One Outlier

Start with five values:

2,โ€…โ€Š4,โ€…โ€Š5,โ€…โ€Š6,โ€…โ€Š82,\; 4,\; 5,\; 6,\; 8

  • Mean =2+4+5+6+85=255=5= \dfrac{2+4+5+6+8}{5} = \dfrac{25}{5} = 5
  • Median =5= 5 (the middle value)

Now toss in a single outlier, 5050:

2,โ€…โ€Š4,โ€…โ€Š5,โ€…โ€Š6,โ€…โ€Š8,โ€…โ€Š502,\; 4,\; 5,\; 6,\; 8,\; 50

  • Mean =2+4+5+6+8+506=756=12.5= \dfrac{2+4+5+6+8+50}{6} = \dfrac{75}{6} = 12.5
  • Median =5+62=5.5= \dfrac{5+6}{2} = 5.5 (average of the two middle values)
BeforeAfterChange
Mean5512.512.5+7.5+7.5 ๐Ÿ˜ฑ
Median555.55.5+0.5+0.5

โš ๏ธ The mean leaped by 7.57.5, while the median barely budged. This is exactly why a report that hides an outlier behind "the average" can be so misleading.

Concept Check ๐ŸŽฏ

Measure the Damage ๐Ÿงฎ

A study group's quiz scores:

70,โ€…โ€Š72,โ€…โ€Š74,โ€…โ€Š76,โ€…โ€Š7870,\; 72,\; 74,\; 76,\; 78

1) Mean =โ€‰?= \,? 2) Median =โ€‰?= \,?

Now a sixth member scores an 88, giving โ€…โ€Š8,โ€‰70,โ€‰72,โ€‰74,โ€‰76,โ€‰78\;8,\, 70,\, 72,\, 74,\, 76,\, 78.

3) New mean =โ€‰?= \,? (it divides evenly) 4) New median =โ€‰?= \,?

Why Some Statistics Resist and Others Don't

The pattern in that drill is no accident. It comes down to what each statistic actually uses:

  • The mean sums every value, so an extreme number changes the total โ€” and the average shifts.
  • The range is built from the very smallest and largest values, so an outlier is one of its inputs.
  • The median depends only on the middle position, so a far-off value just sits at the end without moving it.
  • The IQR uses the quartiles โ€” the edges of the middle half โ€” and ignores the extremes entirely.

๐Ÿ”‘ Memory hook: statistics built from positions in the middle (median, IQR) resist outliers; statistics built from every value or the extremes (mean, range, standard deviation) do not.

Use the next check to sort each statistic into the right bucket.

Resistant or Not? ๐Ÿ”ฝ

For each statistic, choose whether a single outlier changes it a lot or barely at all.

Part 5: Causes, Decisions & Mastery Check

๐ŸŽฏ Outliers in Data

Part 5 of 5 โ€” Causes, Decisions & Mastery Check


You can now (1) recognize an outlier, (2) flag one with the 1.5ร—IQR1.5 \times \text{IQR} rule, (3) flag one with the zz-score rule, and (4) describe how outliers warp the mean, range, and standard deviation. The last skill is judgment: what to do once you've found one.

Where Outliers Come From โ€” and What to Do

CauseExampleSensible action
Data-entry error470470 typed for 4747Fix it if you can, or remove it
Measurement errora broken scale reads 00Discard the faulty reading
Wrong unitsheight in cm mixed with mConvert to consistent units
A genuine rare eventa record-breaking floodKeep it โ€” it is real and meaningful

โš ๏ธ Never delete an outlier just because it is inconvenient. Removing real data to make a chart look tidy is a form of dishonesty. Investigate the cause first; only remove a value if you have good reason to believe it is an error.

๐Ÿ’ก A good report often shows the analysis both ways โ€” with and without the outlier โ€” and explains the difference, so the reader can judge for themselves.

Concept Check ๐ŸŽฏ

Full Analysis ๐Ÿงฎ

Ages of people at a small workshop, sorted, with n=9n = 9:

12,โ€…โ€Š13,โ€…โ€Š14,โ€…โ€Š15,โ€…โ€Š16,โ€…โ€Š17,โ€…โ€Š18,โ€…โ€Š19,โ€…โ€Š5212,\; 13,\; 14,\; 15,\; 16,\; 17,\; 18,\; 19,\; 52

The five-number summary is min =12=12, Q1=13.5Q_1 = 13.5, median =16=16, Q3=18.5Q_3 = 18.5, max =52=52.

1) IQR=Q3โˆ’Q1=โ€‰?\text{IQR} = Q_3 - Q_1 = \,? 2) Upper fence =Q3+1.5โ‹…IQR=โ€‰?= Q_3 + 1.5 \cdot \text{IQR} = \,? (decimal is fine) 3) How many values are outliers? โ€‰?\,?

Your Outlier Toolkit

Before the final practice, here is everything in one place:

GoalKey move
Spot by the IQR ruleflag values beyond Q1โˆ’1.5โ€‰IQRQ_1 - 1.5\,\text{IQR} or Q3+1.5โ€‰IQRQ_3 + 1.5\,\text{IQR}
Spot by the zz-score ruleflag values with โˆฃzโˆฃ>2\vert z\vert > 2, where z=xโˆ’xห‰ฯƒz = \dfrac{x - \bar{x}}{\sigma}
Report center with an outlieruse the median (resistant)
Report spread with an outlieruse the IQR (resistant)
Decide what to dofind the cause first; keep genuine data, fix or remove true errors

โš ๏ธ A value exactly on a fence (or with โˆฃzโˆฃ|z| exactly 22) is not an outlier โ€” it has to be strictly beyond the cutoff.

Mixed Practice ๐ŸŽฏ

One Last Word

Finding an outlier is the beginning of the story, not the end. A flagged value is an invitation to ask "why?" โ€” a typo, a broken sensor, or a genuinely remarkable event. The math points at the unusual value; you decide what it means.

Three questions ahead to lock it all in.

Exit Quiz โœ…

Answer all three to finish the lesson.