# Calculating the position of the median I know this is a simple question, but I cannot find a strai

Calculating the position of the median
I know this is a simple question, but I cannot find a straight answer anywhere.
When calculating the medium of listed data, the formula is (n+1)/2. My Statistics teacher said for grouped data the position of the medium is n/2. However, this seems contradictory as for discrete grouped data, the data could be written in a list if the original values were known. Therefore two different values for the median are found.
I know this question is probably going to get flagged as it has already been asked, however, it has never been answered. I find it frustrating that such a fundamental concept in Statistics, what is supposed to be precise and never subjective has a wishy-washy answer.
Rant over, I think the position should be (n+1)/2 for discrete data and n/2 for continuous data. Moreover, this then leads into the obvious question of how we should calculate quartiles as well.
It would be nice if everyone could agree on a certain method for calculating the medium as all my textbooks are saying different things.
Someone please dispell the confusion and this statistical mess.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Marquis Matthews
Answer 1: The $\frac{n+1}{2}$ formula you provided is, at best, a bit sloppy unless interpreted properly.
Example: If your data is $\left\{3,5,9,10\right\}$, then your median can be found in position 2.5. Since that's not a whole number, we usually interpret it as "the average of entries 2 and 3," or in this case, $7$. This is a convention; there's no theoretically deep reason for why it's the "correct thing to do."
Answer 2: You're hoping for too much from the formula for the grouped median. It is not possible to actually extract a median with any accuracy, because the process of grouping destroys so much information in the dataset.
Example: The above data could be presented as
$\begin{array}{cc}\text{Bin}& \text{Count}\\ 1-3& 1\\ 4-6& 1\\ 7-9& 1\\ 10-12& 1\end{array}$
There are many different ways to compute the median from grouped data presented in this way. (What number do you use as the "class representative?" For the $1-3$ class, is the representative $2$ as the midpoint of $1$ and $3$, or is it $2.5$ as the midpoint of the adjacent lower class limits $1$ and $4$?) Most of the calculations you could do won't reproduce the original answer of $7$. And just in case any of them would, notice that I could switch the $5$ in my original dataset for $4$, which would change the median calculated in example 1 to $6.5$ but possess the exact same frequency distribution above.
Example 3: You're hoping for too much in general with consistency of medians and quartiles at all. If you play around with some different statistical software, you might notice that medians, quartiles, etc. of the exact same datasets could be calculated differently. There is no "true correct" algorithm for what these should be; there are various conventions that are all fairly reasonable for how one could compute them. In many introductory statistics experiences, one averages two adjacent numbers when needed; however, some statistical software packages like R will do some linear interpolation of numbers and get slightly different results.
TL;DR: There's no right way to do this, so go with what your teacher says in each context.