Consider we have the $100$ distinct integers between $1$ and $100$ inclusive. The median and fiftyth percentile can be calculated as below.

Ordering: $1,2,3 ..... ,98, 99, 100$

I have two simple questions:

  1. Did I calculate the median and $50$ percentile correctly? If I calculated them correctly, why all of the sources say $50$th percentile is equal to median.
  2. If I didn't calculate them correctly, can you help me understand my mistake(s)?
  • 1
    $\begingroup$ For odd sample size the 50th percentile is the median. And for even sample sizes where the 50th percentile element has multiplicity.. The median just has a formula to have a definition for even data sets $\endgroup$
    – Pieter21
    Dec 7, 2016 at 18:56
  • $\begingroup$ @Pieter21 I can't understand your point about "multiplicity" $\endgroup$
    – Cardinal
    Dec 7, 2016 at 18:57
  • 1
    $\begingroup$ If sample set were 1,2,2,3, the element 2 has multiplicity 2, and the 50th percentile equals the median $\endgroup$
    – Pieter21
    Dec 7, 2016 at 18:58
  • $\begingroup$ @Pieter21 I think there is no multiplicity in my question. $\endgroup$
    – Cardinal
    Dec 7, 2016 at 18:59

1 Answer 1


Different books and software define quantiles using different rules. As you have already discussed, one of the differences is how ties (multiplicities) are treated. These different definitions can give noticeably different results for small datasets, but when the sample size increases the differences usually become negligible.

For most practical purposes, lower quartile, median, and upper quartile are the 25th, 50th and 75th percentiles, respectively.

In R statistical software, these are the results for your 'dataset' of the numbers from 1 through 100.

 x = 1:100;  median(x); quantile(x, .50)
 ## 50.5    # median
 ##  50% 
 ## 50.5    # 50th percentile 

For the dataset y of the numbers from 0 through 100, both answers are 50. Minitab statistical software also gives gives 50.5 and 50 as the medians for the two datasets, respectively. Altogether, there are about a dozen slightly different rules in use for finding quantiles. So Minitab and R agree on that much. But for the 50th percentile they both disagree with the rule you stated in your question. (SAS statistical software gives 50 as the 50th percentile of dataset x and 49 as the 50th percentile for dataset y.)

As a beginning statistics student, there are two important bits of advice:

(1) During your course, always use the definitions provided by your textbook or instructor.

(2) Understand that others may have slightly different rules, so don't be surprised if you see something a little different in another text, using a statistical calculator, using statistical software, or for summarized data in a journal article.

  • 9
    $\begingroup$ +1 for the careful discussion. I'd stress the fact that in real life (beyond elementary courses) the median is useful for large datasets. Then it's (essentially) the 50th percentile. $\endgroup$ Dec 25, 2016 at 1:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .