Re: Special Excel-meaning of median.



Morten Welinder wrote:

Oh, boy.

yeah...


In *my* book, the median (singular) and any other fractile is an
observation in the data set.  More precisely, it is the largest
of the medians (plural).  If the destribution function is called
F, the medians are the members of the set

    { x | lim [xm -> x-] F(xm) <= p <= F(x) }

where, p=1/2.  (That would be the closed interval between the two
points that Excel average over in the discrete case.)

But we're shooting for Excel compatibility, so all that is not
very important.

good thing. (In fact this `Excel' definition is the same as the one used by MuPad and ( I am pretty sure) Mathematica, as well as the definition used in most North American intro stats books. Of course which one is `correct' I would rather not argue.)



In any case, it would be nice to use this function in analysis-tools.c. That's why I am wondering whether this function shouldn't be in math-func.h/c with all the other range_* functions rather than in fn-stats.c?


I think it may be time to extract all the range functions (none of
which are related to R code, btw.) out into a new file, say rangefuncs.c.
That would make them callable from analysis-tools.c

Morten

Having the range_* functions in math-func.* is fine, analysis-tools.c needs some of the other functions in math-func.h anyways. It would just be nice to have range_excel_median together with the otehr range_* functions.

Andreas

--
Prof. Dr. Andreas J. Guelzow Assoc. Prof of Mathematics
Concordia University College of Alberta
http://www.math.concordia.ab.ca/aguelzow





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]