OliverMarchand
4/12/2006 12:06:00 PM
Stefano, thanks for your input!
> If your input data are floats and your result is also a float, may ask
> you why you want to round them?
I used a (as I saw now) non-standard definition of the median, in ruby
say:
median =
array_with_floats.sort[(array_with_floats.length/2).to_f.round]
where the median is ensured to be an element of the list of values.
With the standard definition from [1], there is no rounding effect -
yes.
I have no formal analysis of this at hand or cannot quickly derive one,
but I am pretty sure that using round-to-even for my median is
statistically "better" in a useful sense then using
round-away-from-zero.
cheers,
Oliver