2

If you enter these values into Wolfram:

{18,21,13,19,24,17,14,12,15,14}

In the Statistics output it shows a median of 16, which is correct. However, in the Box and Whisker chart, it shows the median as 15. Does anyone know why?

enter image description here

  • 2
    Oddly, doing `BoxWhiskerChart[{18, 21, 13, 19, 24, 17, 14, 12, 15, 14}]' in Mathematica gives this graph which agrees with the Statistics output but not the box-and-whiskers chart shown. Another strange feature is that if you mouse over the Wolfram chart, the alt text indicates that the median is 15. I'd chalk it up to a WolframAlpha bug, I guess? – Semiclassical Jun 14 '16 at 23:01

1 Answers1

3

There is no universally-agreed-upon definition of median for a data set with an even number of values.

You have $10$ values, of which five are $\le 15$ and the others $\ge 17$. The median, defined as "a value separating the lower half of the data from the upper half", could in principle be anything between $15$ and $17$, but it's most common to take the average of the two, or $16$. It seems that Wolfram Alpha's Box-and-Whisker chart is using a different convention, the $50$'th percentile, which for $2n$ data points is the $n$'th point (in increasing order).

BTW, Maple puts the median at $16$ in this case, as expected.

It could be that the programmer, having used the $25$'th and $75$'th percentiles for the top and bottom of the box, got lazy or confused and used the $50$'th percentile instead of the median, not realizing that this is not the usual convention.

Robert Israel
  • 448,999