# Tukey five number summary and percentiles

I had this question on a test:

Question: What is the Five-numbers summary for the following
numeric distribution, to be used in a Boxplot:
Age = {10, 10, 11, 12, 12, 13, 13, 15, 15, 16, 18, 18}
A (10, 12, 14, 16, 18)
B (10, 12, 13, 16, 18)
C (10, 11.5, 13, 15.5, 18)
D (10, 11, 13, 15, 18)


With C being the correct answer. In R:

> a <- c(10, 10, 11, 12, 12, 13, 13, 15, 15, 16, 18, 18)
> fivenum(a)
[1] 10.0 11.5 13.0 15.5 18.0
> quantile(a)
0%   25%   50%   75%  100%
10.00 11.75 13.00 15.25 18.00
> summary(a)
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
10.00   11.75   13.00   13.58   15.25   18.00


The quantiles don't match! What is going on here.

• ?quantile and ?fivenum (there are nine different ways how you could compute quantiles in R) – Tim May 14 '18 at 13:44
• @Tim type: an integer between 1 and 9 selecting one of the nine quantile algorithms detailed below to be used. Oh god ... – Vorac May 14 '18 at 13:53
• The five-letter summary is not defined in terms of quantiles: it is defined in terms of letter statistics. Therefore, what R (or any other software) computes as quantiles is scarcely relevant. – whuber May 14 '18 at 14:37
• @whuber the definition in Wikipedia, as well as the R example there, talk about quartiles. Googling 'letter statistics' yields nothing I can grasp. I am at a loss. – Vorac May 14 '18 at 14:58
• John Tukey defined these originally. Many subsequent "authorities" misunderstood his definitions and have replaced his "hinges" (aka "fourths") with "quartiles." Although the substitution is harmless for large datasets (since it makes little difference), the distinction becomes apparent in smaller datasets. Whoever set you this problem evidently was trying to determine whether you understood Tukey's procedure. Perhaps the best reference (apart from Tukey's book EDA) would be your own course notes. – whuber May 14 '18 at 15:19