Yes, but if you are writing a verb to compute the median, what are the results of: median 1 2 3 4 5 6 7 8 9 10 median 1 2 3 4 5 6 7 8 9 10 11
On Tue, Jan 10, 2012 at 9:57 AM, Brian Schott <[email protected]>wrote: > > > Think of the median as its position in the ordered list, not as the number > in that position. Then to compute the quartiles, only use the values in > positions above and below the position of the median. So for example if > there are three numbers that all equal the median, only the middle one has > the median's position. > > --- > (B=) > > On Jan 10, 2012, at 11:58 AM, Roger Hui <[email protected]> wrote: > > > Thanks to you and all other respondents for their helpful replies. > > > > Do Moore & McCabe offer any guidance on how to compute the medians? > > Wikipedia says "there is no universal agreement on choosing the quartile > > values". As well, in computing the IQR I have seen methods that make > sense > > to me but are quite tricky depending on whether #x is odd or even. > > > > e.g Suppose x is 1 2 3 4 5, 6 7 8 9 10. The descriptions I have seen say > > that the median is 5.5. When you then compute the median of the lower > half > > (q1), you exclude the 5.5, and report that q1 is 3, and likewise q3 is 8. > > In contrast, if y is 1 2 3 4 5, 6, 7 8 9 10 11, the median is 6, but when > > you compute q1 you *include* the 6 with the lower half, and report that > q1 > > is 3.5, likewise you include 6 with the upper half so that q3 is 8.5. > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
