Khan/khan-exercises — Issue #9420: Creating box and whisker plots - Algorithm for Box and Whisker miscoded
Author: KhanBugz
Created: 2011-12-23 22:15:48+00:00
State: open
Labels: chrome, win7, wrong-or-unclear

Reporter: budkroll@gmail.com

I am an adult math tutor and love KA. There is what looks like bad code in the Creating Box and Whisker Plots Exercise Module. It calculates min, max, median and 1st Quartile perfectly. But it is always off on the 3rd Quartile, the answer does not correspond with the step by step explanation it gives when you ask for help. With 15 numbers in the sample set the median is the 8th sorted number (16/2), the 1st quartile is the average of the 4th and 5th sorted number (9/5=4.5) and the 3rd Quartile should be the average of the 11th and 12th sorted number (midway between the 8th and 15th number). Your module consistently returns the 3rd Quartile as being the average of the 12th and 13th sorted number. This is incorrect. Looks like a simple programming error. Thanks.

Bud Kroll

[creating_box_and_whisker_plots.html?seed=195&problem=0](http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/creating_box_and_whisker_plots.html?seed=195&problem=0&debug)

[Answer timeline](http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/creating_box_and_whisker_plots.html?seed=195&problem=0&debug&activity=%5B%5D)

[]

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7

MathJax is loaded, ready, queue length: 0