# Is it accurate that the median is a score where 50% of the observations are above it and 50% are below it?

Lets say that the dataset has 3 observations namely 1, 2 and 3. The median is 2. Is 3, which is above the median, 50% of the dataset? How to correctly interpret the median?

• If you have large numbers of repeated values at the median, then the numbers above and below can become vanishingly small. Nov 2, 2016 at 14:42
• There are actually multiple definitions of quantiles (and therefore also medians) that differ subtly. For instance, the R quantile() function takes a type argument that can take nine different values. Take a look at Hyndman & Fan (1996, The American Statistician). Nov 2, 2016 at 16:00
• Understanding "above" to mean "greater" and "below" to mean "less than," it is accurate if you replace each "50%" by "at most 50%."
– whuber
Nov 3, 2016 at 16:53

Sample median is defined as a value $\hat{x}$ that splits the samples $x_i$ of a data set $X$ such that at least 50% of the samples are greater or equal and at least 50% are less or equal than $\hat{x}$. Because you only have a finite sample set the median can only be approximated.

Assuming the samples are sorted, such a value can be computed by the following formula:

$$\hat{x}= \begin{cases} x_{\frac{n+1}{2}},\hspace{3cm} \text{if n is odd}\\ \frac{1}{2}\left( x_{\frac{n}{2}} + x_{\frac{n}{2} + 1} \right),\hspace{0.72cm} \text{if n is even} \end{cases}$$

where $n$ is the number of samples. In your example $X = \{1, 2, 3\}$, $n = 3$, which means case 1 applies:

$$\hat{x} = x_{\frac{3 + 1}{2}} = 2$$

This means that there are two samples $x_i \in \{1, 2\}$ that satisfy $x_i \leq \hat{x}$ and two samples $x_i \in \{2, 3\}$ that satisfy $x_i \geq \hat{x}$.

So it's exactly as we wanted it to be.

The concept can be generalized to quantiles. A $p$ quantile $\hat{x}_p$ is a a value that splits the samples such that at least $p \dot{}$ 100% of the samples are less or equal then $\hat{x}_p$ and at least $(1 - p) \dot{}$ 100% of the samples are greater or equal then $\hat{x}_p$. So the sample median is the $0.5$ quantile.

The formula then becomes the following:

$$\hat{x}_p= \begin{cases} x_{\lceil p\dot{}n \rceil},\hspace{3cm} \text{if p \dot{} n is an not integer}\\ \frac{1}{2}\left(x_{p\dot{}n} + x_{p\dot{}n + 1} \right),\hspace{0.72cm} \text{if p \dot{} n is an integer} \end{cases}$$

where $n$ is the number of samples, $p$ the quantile, and $\lceil x \rceil$ is the ceiling function.

Some quantiles have names, because they are used often. Such as $0.5$ quantile is called median, $0.33$ quantile si the tercile, and so on.

• |t is worth mentioning that this is a formula for sample median, not a median for a distribution that is defined as a point that marked by the 0.5 quantile of the distribution.
– Tim
Nov 2, 2016 at 12:03
• Thanks. Does this definition of median extend to how we interpret quartiles, deciles and percentiles? Nov 2, 2016 at 12:55
• Yes, it does. @Tim: Yes, you are right. I added it. I thought it was clear from context.
– hh32
Nov 2, 2016 at 13:24
• I disagree with "the" --- there may be an interval of values. For example, if the data are the integers 1:10, anything in $(5,6)$ satisfies this definition.
– JDL
Nov 2, 2016 at 14:36
• @HeinkeHihn: I think JDL's point is just that your English description doesn't match the formula. More accurate to would be to say for example that it's defined as "a value that splits a data set... specifically it's the one given by this formula". Nov 2, 2016 at 19:42

Your statement is exactly accurate when the dataset has even number of observations (so that the median is calculated from the two "middle" ones) and almost accurate when you have an odd number of observations (because the middle one is neither above nor below the median). If you are concerned about precise terminology, you could say that median is a score where equal numbers of observations are above and below it, but your interpretation sounds fine in all practical situations.

• This is wrong, consider 1,2,3,3,4 Nov 2, 2016 at 17:39