3 ms·
Bit surprised that this "Getting the median of a single sorted list is trivial: it is either the central value if the list has an odd-numbered length, or the m
by walshemj 5y ago
Bit surprised that this
"Getting the median of a single sorted list is trivial: it is either the central value if the list has an odd-numbered length, or the mean of the two central values otherwise."
Is stated with no proof its not something I recall from collage
- frumiousirc 5y agoThe proof is by definition.
- true1true1true1 5y agoRelated comic #3951_(en)_ABOUT TOLERANCE AND UNDERSTANDING... okt.16 > //www.bilder-upload.eu/bild-cfb913-1622910941.png.html (-:
- zikzak 5y agoIt's been 20+ years but this still sounds familiar. Might just be the "that's sounds right so I'll assume I knew it" bias that makes educated people susceptible to subtle propaganda, though. :)
- qsort 5y agosorted
- casion 5y agoThat's what the median is! The middle number in a sorted list.
- IncRnd 5y agoThat is the definition of median. You might be confusing the definition of median with mean or mode.
- walshemj 5y agoThank you I was
- occamrazor 5y agoIt’s the definition of median. It doesn’t need a proof.
- mbrudd 5y agoIf you want to define the median in a way that generalizes to other situations, this is actually not the way to go! Here's a more general definition: a median of the numbers {x_1, ... x_n} is a number m that minimizes the sum of the absolute deviations, |x_1 - m| + |x_2 - m| + ... + |x_n - m| . Medians are generally not unique via this definition, but they can then be defined for things like sets of points in the plane, in space, etc. (cf. geometric median); the traditional definition is the average of all of the medians under this more general definition.