A survey of customers recorded their ages:
Find the quartiles and using the Tukey method, and compare them with the values a calculator or spreadsheet reports when the median is excluded from the halves.
Sort the data — every quartile rule is a rule about positions, so order comes first.
Find the median. With (odd) the median is the single middle value, in position :
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.
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 values and the upper half the last :
Each half has an odd count, so each hinge is again a single middle value — the th of :
Compare with the exclusive convention used by most calculators and spreadsheets. Dropping the median from both halves leaves values on each side, so each quartile is an average of two neighbours:
Both answers are "correct" — they are different definitions, not different arithmetic. They can only disagree when is odd, because that is the only case in which a data value sits exactly at the median.
Compute the interquartile range under each rule and note the effect.
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 outlier fences — shifts accordingly, which is why a report should say which convention it used.
Check the fences to see the practical consequence. With Tukey's values the outlier fences are and ; with the exclusive values they are and . Neither rule flags any of the ages as an outlier here (the extremes are and ), 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.
Need to solve a different problem like this? Open the solver →