Statistics · real student question

A survey recorded the ages of 25 customers: 20, 32, 35, 28, 32, 31, 30, 15, 28, 12, 39, 23, 43, 47, 27, 26, 23, 32, 36, 33, 35, 42, 42, 43, 47. Find the first and third quartiles using the Tukey method, and compare them with the quartiles obtained by excluding the median.

Question

A survey of 2525 customers recorded their ages:

20, 32, 35, 28, 32, 31, 30, 15, 28, 12, 39, 23, 43, 47, 27, 26, 23, 32, 36, 33, 35, 42, 42, 43, 4720,\ 32,\ 35,\ 28,\ 32,\ 31,\ 30,\ 15,\ 28,\ 12,\ 39,\ 23,\ 43,\ 47,\ 27,\ 26,\ 23,\ 32,\ 36,\ 33,\ 35,\ 42,\ 42,\ 43,\ 47

Find the quartiles Q1Q_1 and Q3Q_3 using the Tukey method, and compare them with the values a calculator or spreadsheet reports when the median is excluded from the halves.

Step-by-step solution

  1. Sort the data — every quartile rule is a rule about positions, so order comes first.

    12, 15, 20, 23, 23, 26, 27, 28, 28, 30, 31, 32, 32, 32, 33, 35, 35, 36, 39, 42, 42, 43, 43, 47, 4712,\ 15,\ 20,\ 23,\ 23,\ 26,\ 27,\ 28,\ 28,\ 30,\ 31,\ 32,\ \underline{32},\ 32,\ 33,\ 35,\ 35,\ 36,\ 39,\ 42,\ 42,\ 43,\ 43,\ 47,\ 47

  2. Find the median. With n=25n=25 (odd) the median is the single middle value, in position 25+12=13\frac{25+1}{2}=13:

    M=32M=32

    This is where the two conventions part company: the median is an actual data value, so there is a genuine choice about whether it belongs to the lower half, the upper half, both, or neither.

  3. Apply Tukey's rule: the median goes into both halves. Tukey's hinges are defined as the medians of the lower and upper halves including the overall median. The lower half is then the first 1313 values and the upper half the last 1313:

    lower: 12,15,20,23,23,26,27,28,28,30,31,32,32\text{lower: } 12,\,15,\,20,\,23,\,23,\,26,\,\underline{27},\,28,\,28,\,30,\,31,\,32,\,32

    upper: 32,32,33,35,35,36,39,42,42,43,43,47,47\text{upper: } 32,\,32,\,33,\,35,\,35,\,36,\,\underline{39},\,42,\,42,\,43,\,43,\,47,\,47

    Each half has an odd count, so each hinge is again a single middle value — the 77th of 1313:

    Q1=27,Q3=39Q_1=27,\qquad Q_3=39

  4. Compare with the exclusive convention used by most calculators and spreadsheets. Dropping the median from both halves leaves 1212 values on each side, so each quartile is an average of two neighbours:

    Q1=26+272=26.5,Q3=39+422=40.5Q_1=\frac{26+27}{2}=26.5,\qquad Q_3=\frac{39+42}{2}=40.5

    Both answers are "correct" — they are different definitions, not different arithmetic. They can only disagree when nn is odd, because that is the only case in which a data value sits exactly at the median.

  5. Compute the interquartile range under each rule and note the effect.

    IQRTukey=3927=12,IQRexclusive=40.526.5=14\text{IQR}_{\text{Tukey}}=39-27=12,\qquad \text{IQR}_{\text{exclusive}}=40.5-26.5=14

    Including the median pulls both hinges toward the centre, so Tukey's rule always gives an IQR that is the same or smaller. Anything built on the IQR — a boxplot's whiskers, the 1.5IQR1.5\,\text{IQR} outlier fences — shifts accordingly, which is why a report should say which convention it used.

  6. Check the fences to see the practical consequence. With Tukey's values the outlier fences are 271.5(12)=927-1.5(12)=9 and 39+1.5(12)=5739+1.5(12)=57; with the exclusive values they are 26.51.5(14)=5.526.5-1.5(14)=5.5 and 40.5+1.5(14)=61.540.5+1.5(14)=61.5. Neither rule flags any of the 2525 ages as an outlier here (the extremes are 1212 and 4747), so the choice of convention does not change the conclusion in this data set — but it easily could in a set with a longer tail.

Answer

Q1=27,Q3=39,IQR=12Q_1=27,\qquad Q_3=39,\qquad \text{IQR}=12

Need to solve a different problem like this? Open the solver →