
Why the average triumphed over the median - matco11
http://priceonomics.com/how-the-average-triumphed-over-the-median/
======
gaur
And when doing function optimization / maximum likelihood estimation /
Bayesian analysis, the quantity of interest often is neither the mean nor the
median, but rather the mode [0].

One point the author hints at is that the median is more computationally
intensive to compute than the mean. Computing the median requires you to store
all your samples in memory, and then sort them. Computing the mean requires no
sorting, and depending on the exact situation (e.g., computing the mean on
data being generated in real time) may not require storing any samples.

[0] The mode is usually referred to as the "maximum _a posteriori_
probability" in the context of Bayesian analysis [1], I guess because some
people felt like they weren't getting enough use out of their prep-school
Latin classes.

[1]
[https://en.wikipedia.org/wiki/Maximum_a_posteriori_estimatio...](https://en.wikipedia.org/wiki/Maximum_a_posteriori_estimation)

~~~
cyphar
> One point the author hints at is that the median is more computationally
> intensive to compute than the mean. Computing the median requires you to
> store all your samples in memory, and then sort them.

Actually, you can find the median in O(n)[1]. It still requires storing them
all in memory though. It's based on quick select.

[1]:
[https://en.m.wikipedia.org/wiki/Median_of_medians](https://en.m.wikipedia.org/wiki/Median_of_medians)

~~~
myrryr
Nope, Median of Medians is an approximation.

~~~
tamana
The median-finding algorithm os exact. Reread the Wikipedia page more closely.
MoM uses an approximate heuristic to guide the search for the exact median.
The key is that the approximate has bounded error, and can be refined to exact
in linear time.

~~~
myrryr
Huh, I didn't get that from the Wiki article (it is a bit hard going), but...
I found some other easier articles to follow on this.

I stand corrected. Median of medians is freaking awesome :)

~~~
justratsinacoat
>I found some other easier articles to follow on this

Post them?

