# What is the difference between a median and a population/sample median?

If I have an order statistic, I can rank them from smallest to largest like

$$X_{(1)}, X_{(2)},...,X_{(n)}$$

and there will be some median $X_{m}$.

But I can also have some distribution $f(x)$ and define an integral

$$\int_{0}^m f(x)dx = \frac{1}{2}$$ and, if I solve for $m$, this will be the median for the distribution.

My Question

What is the difference between these two types of medians?

Your order statistic $X_m$ is the median of your data. This is your sample median and can change depending on what sample you pull. For example, if you gather a sample of 50 observations on one day and a sample of 50 observations on the next day, it is very likely that $X_m$ calculated from sample 1 will be different from $X_m$ calculated from sample 2.
Using your integral above to solve for $m$ will find you the population median - perhaps denoted $M$. This will not change regardless of what data you pull or the size of your sample. $M$ is a parameter, not a statistic.
You may use $X_m$ to estimate $M$. If you were interested in finding the median height of American adults, you may gather a sample of $n$ people and calculate $X_m$. Of course it will be logistically impossible to measure the height of every adult and calculate $M$ directly, so you use $X_m$ to estimate $M$.
• A statistic is a function of data. Generally data comes in the form of a sample and thus most often a statistic is based off of a sample, not a population. Thus, $X_m$ will be a sample statistic. If there is some case where you are able to gather all of your data, then $X_m$ will still be a statistic but will be based on the entire population and will equal your true median $M$. Since $f(x)$ is your probability density function, $f(x)$ defines your population and thus finding the median $M$ by integrating $f(x)$ from 0 to $M$ will get you the population median. Mar 14, 2016 at 22:11