3 ms·
To get the median of an even number of values, you must calculate the mean of the middle two values. Therefore the definition of the median relies on the mean a
by vorg 9y ago
To get the median of an even number of values, you must calculate the mean of the middle two values. Therefore the definition of the median relies on the mean already being defined when working with a discrete number of values, which isn't really explained in the post.
In fact, there's a whole spectrum of averages defined with mean and median on each end, depending on how many outliers you eliminate. For example, if you have eight numbers, you can define a spectrum of four averages:
2,3,5,7,11,13,17,19 // mean, here 9.6250
3,5,7,11,13,17 // mean with outlier on each side stripped, here 9.3333
5,7,11,13 // mean of central two quartiles, here 9.0000
7,11 // median (i.e. mean of center two numbers), here 9.0000
You could then repeat the process on that spectrum of averages to get a shorter spectrum, here [9.2396 (mean), 9.1667 (median)], recursively until you have one "mean-median" left, here 9.2031.
I wonder how this fits in with the explanation in the post.
- jfaucett 9y agoWell, very sloppily speaking - the median is the first derivative of the mean, and the mode is the second derivative. That would be another way of thinking about this in terms of rates of change in discrepancy.
- j2kun 9y agoIt relies on a quantity being defined which happens to be equal to the mean, but that value can be arrived at without having defined the mean a priori. The minimizers of (7,11) with respect to the 1-norm defined in the post include all values between 7 and 11. You need not have defined the mean to state this optimization problem. I suppose which median you pick can be considered a heuristic. I think "removing outliers" is also snugly in the camp of practical heuristics. A mathematical definition might not want to automatically eliminate outliers when "outlier" is also subject to a choice of definition.
- mehrdadn 9y ago> To get the median of an even number of values, you must calculate the mean of the middle two values This is actually not true! The correct way to do this would be to take the (right-hand) limit of argminₛ ∑ᵢ |xᵢ - s|ᵈ as d → 1⁺. You get back a unique number and it is not the mean of the middle two values.
- FabHK 9y agoIf I'm not mistaken, if there is an even number of values, any value between (and including) the middle two values minimises the L1 norm. To choose the "central" (mean) of those two is just a convention.