Boost logo

Boost Users :

Subject: Re: [Boost-users] statistics: exact median, first and third quartile
From: gast128 (gast128_at_[hidden])
Date: 2013-03-01 04:09:08


Steven Watanabe <watanabesj <at> gmail.com> writes:

> > Did I overlook something or is this just not supported?
> >
>
> This is called std::nth_element.
>
> In Christ,
> Steven Watanabe

Thx, but are you sure? Median is defined as the middle element in odd
distributions but is the average of the 2 middle elements in even distributions.
For quartiles (or generalized quantiles) its even worse: there are multiple
definitions for quartiles. I even had an article listed 11 definitions of
calculating the quartile:
http://www.amstat.org/publications/jse/v14n3/langford.html. Still it would have
been better if Boost had done the thinking for me :)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net