Statistics function incorrectly computing median
Miguel Garcia-Blanco
miguel.01 at ihug.com.au
Mon Jan 14 01:01:11 CST 2008
> I took another look and found a method that is more consistent with
> the original algorithm. The original calculates the CDF from left to
> right. So I added an equivalent calculation form right to left, and
> averaged the two results.
>
> I expect the result will be the same calculated by GNU's R.
I just did a quick test. The R output is still different (1st and 3rd
quartiles), although there seem to be multiple definitions for sample
quartiles [1]. Incidentally, Maxima gave the same results as R.
[1] http://mathworld.wolfram.com/Quartile.html
-Miguel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: compare.txt
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080114/768abf34/attachment.txt
More information about the Bug-octave
mailing list