For our purposes we need to find at the least one case when a 50th percentile and the median aren't the same thing. I will present three such cases.

Here the first case (proof) goes as this: Suppose we have set of numbers {1,2,3}. Its median is 2. But 2 is NOT a 50th percentile because 2 isn't a percentile at all, it's a tertile. It has 1/3 of datapoints below it and 2/3 of datapoints below or equal to it.

The second proof: Suppose we have set of numbers {1,2,3,4,5}. Its median is 3. But 3 is NOT a 50th percentile. For the inclusive definition of a percentile it's a 60th percentile, while for the exclusive definition it's a 40th percentile.

The third proof: Suppose we have a set of numbers {0,10}. Its median is 5. And it's also a 50th percentile. But there are other 50th percentiles that aren't equal to 5 (and thus, aren't medians), namely any number in interval [0;10) for the inclusive defintion of a percentile and any number in interval (0;10] for exclusive definition of a percentile.

  • $\begingroup$ Your third example is wrong. $\endgroup$ – Yves Daoust Jun 2 at 14:35
  • $\begingroup$ @YvesDaoust Can you elaborate? $\endgroup$ – user161005 Jun 2 at 14:41
  • $\begingroup$ How could, say $2$ be a $50^{th}$ percentile ? Or a median ? $\endgroup$ – Yves Daoust Jun 2 at 14:43
  • $\begingroup$ It's a 50th percentile because 50% of datapoinst are less than 2. $\endgroup$ – user161005 Jun 2 at 14:44
  • $\begingroup$ Ok, I read $\{0,\cdots,10\}$. In case of ties, all intermediate values are quantiles, and it is customary to take the mean, here, $5$. $\endgroup$ – Yves Daoust Jun 2 at 14:48

For a correct definition of the quantiles, you must use the (empirical) $\text{cdf}$ of the distribution, i.e.

$$\text{cdf}_X(x)=\frac{\#\{k:x_k\le x\}}n.$$

When $X=\{1,2,3\}$, the $50\%$ percentile is $2$, because $\dfrac{\#\{1\}\le50\%}3$, while $\dfrac{\#\{1,2\}}3>50\%$, the "jump" occurs at $2$ and this is where the $\text{cdf}$ meets the $50\%$ horizontal.

If you don't adopt such a definition, neither the centiles nor the median would exist !

The median, the central quartile and the $50\%$ centile are exact synonyms.

  • $\begingroup$ Firstly, why do you think that your CDF is the only right method to find percentiles (and quantiles in general)? Secondly, if they are exact synonyms, then how do you explain me getting 50th percentiles different from the median when using the calculator? $\endgroup$ – user161005 Jun 2 at 14:40
  • $\begingroup$ @user161005: because it is. $\endgroup$ – Yves Daoust Jun 2 at 14:40
  • $\begingroup$ Amen. How about my second question? $\endgroup$ – user161005 Jun 2 at 14:42
  • $\begingroup$ By second question I meant "if they are exact synonyms, then how do you explain me getting 50th percentiles different from the median when using the calculator?" $\endgroup$ – user161005 Jun 2 at 14:54

Turns out, that there are at the least 8 ways to calculate a percentile (probably even more)

I found this calculator that calculates percentiles in 8 different ways for the same dataset: https://www.wessa.net/rwasp_percentiles.wasp

I was unable to make calculations for {1,2,3} and {0,10}, probably they were too small. But I was able to make calculations for similar sets, {1,2,3,4,5,6,7,8,9} and {0,1,2,3,4,5,6,7,8,9} respectively.

Turns out that I'm both right and wrong in my examples. For some methods the median is indeed different from the 50th percentile, while for some it is equal to the median.

Let's review the results. For an analogue of the first case, set {1,2,3,4,5,6,7,8,9}, I got following results (the median is 5): enter image description here

It seems like the methods used to calculate the 50th percentile are based on definitions of percentiles that allow to percentiles to exist even for such set as {1,2,3,4,5,6,7,8,9}. I have no idea what these definitions are though.

Now the second case, set {1,2,3,4,5} and the median is 3: enter image description here Only one method gave 50th percentile different from the median.

Now the third case, set {0,1,2,3,4,5,6,7,8,9} and the median is 4.5 enter image description here 3 methods gave result different from the median.

So, to summarize it all: Some methods can sometimes give the 50th percentile that is different from the median. Some methods never give 50th percentile that is different from the median. Some methods (I'm looking at you, "Weighted Average at Xnp"!) always give 50th percentile result that is different from the median. But even when 50th percentile is different from the median, the difference is relatively small. Probably the difference can be ignored altogether.

  • $\begingroup$ These alternative percentiles do not appear to be percentiles (even though on small datasets there are coincidences). $\endgroup$ – Yves Daoust Jun 2 at 14:39
  • $\begingroup$ @YvesDaoust To what do you refer by "alternative percentiles"? And why do you doubt that they are really percentiles? $\endgroup$ – user161005 Jun 2 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.