← Data and scatterplots

πŸ“– Quartiles and outliers

The rule

  • Sort the data first. The median splits it into a lower half and an upper half.
  • Q1 is the median of the lower half. About a quarter of the values sit below it.
  • Q3 is the median of the upper half. About a quarter of the values sit above it.
  • With an odd number of values, leave the median out of both halves.
  • The IQR is Q3 βˆ’ Q1. It is the width of the box: how spread out the middle half is.
  • The range uses only the two ends, so one odd value can stretch it. The IQR ignores the ends.
  • An outlier is a value far from the rest. The rule: it lies below Q1 βˆ’ 1.5 Γ— IQR or above Q3 + 1.5 Γ— IQR.
  • An outlier is not always a mistake. Check it before you keep it or drop it.

Examples

Find Q1, Q3 and the IQR of 3, 5, 6, 8, 9, 11, 12. β†’ Q1 = 5, Q3 = 11, IQR = 6

  1. Seven values. The median is the 4th: 8.
  2. Lower half: 3, 5, 6, so Q1 = 5.
  3. Upper half: 9, 11, 12, so Q3 = 11.
  4. IQR = Q3 βˆ’ Q1 = 11 βˆ’ 5 = 6

Leave 8 out of both halves, then take the middle of each.

02468101214

Find Q1, Q3 and the IQR of 4, 6, 8, 10, 12, 14, 16, 18. β†’ Q1 = 7, Q3 = 15, IQR = 8

  1. Eight values: two halves of four.
  2. Lower half: 4, 6, 8, 10. Q1 = (6 + 8) Γ· 2 = 7.
  3. Upper half: 12, 14, 16, 18. Q3 = (14 + 16) Γ· 2 = 15.
  4. IQR = 15 βˆ’ 7 = 8

Eight values split into two halves of four. Each half has two middle values.

02468101214161820

In 12, 14, 15, 17, 18, 20, 30, is 30 an outlier? β†’ Yes, 30 is above the upper fence, 29

  1. The median is 17. Q1 = 14 and Q3 = 20.
  2. IQR = 20 βˆ’ 14 = 6.
  3. 1.5 Γ— 6 = 9.
  4. Fences: 14 βˆ’ 9 = 5 and 20 + 9 = 29.
  5. 30 is above 29, so 30 is an outlier.

Work out the fences from Q1, Q3 and the IQR, then check the end values.

Seven houses sold for ($000) 400, 410, 420, 450, 480, 500, 1650. Is the 1650 an outlier? β†’ Yes, it is far above the upper fence, 635

  1. The median is 450. Q1 = 410 and Q3 = 500.
  2. IQR = 500 βˆ’ 410 = 90.
  3. 1.5 Γ— 90 = 135.
  4. Upper fence: 500 + 135 = 635. Lower fence: 410 βˆ’ 135 = 275.
  5. 1650 is above 635, so it is an outlier. The other six are inside the fences.

One very dear house sits well beyond the rest.

Watch out

  • β€œThe IQR is the biggest value minus the smallest.” No: that is the range. The IQR is Q3 βˆ’ Q1.
  • β€œWith 7 values, the median goes into both halves.” No: leave the middle value out of both halves.
  • β€œAnything above Q3 is an outlier.” No: only values beyond the fence, Q3 + 1.5 Γ— IQR.
  • β€œThe fence is Q3 + 1.5.” No: multiply 1.5 by the IQR first, then add it to Q3.
Start the lesson β–Ά