Hersi Maths WhatsApp me

Understand · explore · practise

Outliers and IQR fences

Calculate IQR fences, handle values exactly on a threshold and explain why an outlier flag calls for investigation. Original model, animation and worked practice.

Before you startQuartiles, interquartile range and inequalities.

01 / State the rule

An outlier is unusual relative to a specified rule.

Lower fence L = Q₁ − k×IQR; upper fence U = Q₃ + k×IQR

For the strict rule used here, flag x < L or x > U. Common choices include k = 1.5; use the value in the question.

Different definitions can flag different observations. Report the rule alongside your conclusion. A flagged value is a reason to investigate; it does not by itself establish a recording error.

Crossing a fenceExplore

A reference dataset has Q₁ = 10 and Q₃ = 18. Compare a value x with its fixed fences. Adding x to the dataset would require recalculating its quartiles.

IQR = 8. Lower fence = −2; upper fence = 30.

x = 30 equals the upper fence, so this strict rule does not flag it.

A fence is a threshold, not necessarily an observed value or a box-plot whisker.

02 / Calculate both fences

Start with the difference between quartiles.

Q₁ = 12, Q₃ = 20 and k = 1.5.Worked example

IQR = 20 − 12 = 8

The quartile values share the same measurement units.

L = 12 − 1.5×8 = 0

Subtract from the lower quartile.

U = 20 + 1.5×8 = 32

Add to the upper quartile.

01 · Calculate

Q₁ = 6 and Q₃ = 14. Find both fences for k = 1.5.

Hint

IQR = 8.

Worked solution

L = 6 − 12 = −6; U = 14 + 12 = 26.

02 · Units

Times have Q₁ = 15 minutes and Q₃ = 23 minutes. Find the upper fence for k = 2.

Hint

IQR = 8 minutes.

Worked solution

U = 23 + 2×8 = 39 minutes. The multiplier has no units.

03 / Treat equality carefully

Outside a strict fence means beyond it.

Watch: equality and crossing are different

Pause, replay or seek freely. The notes explain the same idea and stay in view.

At x = L or x = U, neither strict inequality holds.

Do not replace < or > with ≤ or ≥ unless that is the rule you were given.

03 · Classify

Using L = −6 and U = 26, classify −7, −6, 26 and 27.

Hint

Test each number against the strict inequalities.

Worked solution

−7 and 27 are flagged. −6 and 26 lie exactly on fences and are not flagged.

04 · A different instruction

A question explicitly flags x ≥ 26. Is x = 26 flagged under that instruction?

Hint

Follow the stated inequality.

Worked solution

Yes. This includes equality. State that this is different from the strict upper-fence rule used elsewhere in this lesson.

04 / Find quartiles before fences

Keep the quartile convention visible.

Ordered data: 2, 4, 6, 8, 10, 12, 14, 40.Worked example

Using the listed-data convention: Q₁ = (4 + 6)/2 = 5; Q₃ = (12 + 14)/2 = 13

Integer n/4 and 3n/4 positions use the mean of that observation and the next.

IQR = 8; k = 1.5 gives L = −7 and U = 25

Calculate before classifying.

40 > 25, so 40 is flagged

The largest observed non-outlier is 14, not the fence 25.

05 · Another list

For 1, 3, 5, 7, 9, 11, 13, 25, use the same quartile convention and k = 1.5. Which values are flagged?

Hint

Q₁ = 4 and Q₃ = 12.

Worked solution

IQR = 8; fences −8 and 24. Only 25 is flagged.

06 · Fence versus observation

In the worked example, why must a whisker described as the largest observed non-outlier end at 14 rather than 25?

Hint

Is 25 in the data?

Worked solution

25 is only the threshold. The largest listed observation that is not flagged is 14. A plotting convention must identify which kind of endpoint it uses.

05 / Compare rules without changing facts

A larger multiplier creates wider fences.

07 · Two multipliers

Q₁ = 10 and Q₃ = 18. Is x = 32 flagged for k = 1.5 and k = 2?

Hint

IQR = 8.

Worked solution

For k = 1.5, U = 30, so 32 is flagged. For k = 2, U = 34, so 32 is not flagged. The observation is unchanged; the classification rule changed.

08 · Wider fences

For fixed quartiles with positive IQR, can increasing a positive k create a newly flagged value under this two-sided strict rule?

Hint

The lower fence moves down and the upper fence up.

Worked solution

No. The unflagged interval widens, so previously unflagged values stay inside. This statement holds the quartiles fixed; adding data may alter them.

06 / Handle estimates and zero IQR

Do not round yourself across a fence.

Keep the available precision until the final comparison. Fences based on interpolated grouped quartiles are estimates. A grouped table cannot always identify which individual records exceed the threshold.

09 · Zero IQR

Q₁ = Q₃ = 5. What does the strict k = 1.5 fence rule flag?

Hint

Both fences equal five.

Worked solution

Any value strictly below or above 5 is flagged. This can happen with many tied observations; it does not prove those different values are errors.

10 · Rounding

Q₁ = 4.24 and Q₃ = 8.76. With k = 1.5, is 15.50 above the upper fence?

Hint

Use the quartiles as given without rounding first.

Worked solution

IQR = 4.52; U = 8.76 + 6.78 = 15.54. Since 15.50 < 15.54, it is not above this fence. Earlier rounding could misclassify a nearby value.

07 / Explain what a flag means

Check context before changing records.

11 · Remove it?

A verified unusually long journey is flagged. Should it automatically be deleted from a study of journey times?

Hint

An unusual journey may belong to the population of interest.

Worked solution

No. Check measurement, eligibility and study purpose. If it is a genuine eligible observation, excluding it merely because it is large can distort the study. Document any justified correction or exclusion.

12 · Grouped information

An upper fence is estimated as 32. A class [30,40) has frequency 7. How many of those seven are definitely above the fence?

Hint

The class straddles 32.

Worked solution

None are guaranteed to exceed 32; the number could be any integer from 0 to 7. The grouped count alone does not identify the individual values.

08 / Calculate, compare, investigate

Keep the rule and conclusion together.

State the quartile convention and multiplier, calculate IQR and both fences, preserve equality and precision, then describe the flagged observations. Investigation is a separate step from classification.

Section 1 of 8 · State the rule