Is quantile just quantile function evaluated at specific values?

30 Views Asked by At

According to Wikipedia, the quantile function is defined by $$Q(p)=\inf \{x\in\mathbb{R}:F(x)\geq p \}.$$ But if I apply this to equally likely data set 10, 11, 12, 13, I get $Q(0.5)=11$. But shouldn't $Q(0.5)$ be the median $\frac{11+12}{2}=11.5$ ?

I thought quantile is just the quantile function evaluated at specific values of $p$, but this example seems to indicate that it is not the case.

2

There are 2 best solutions below

1
On BEST ANSWER

For discrete random variables, quantiles will not behave like you may intuit from continuous random variables. The cummulative distribution function is not continuous, so there is no clear cutoff value where you exactly cross from below 50% to at least 50%.

You can use $x=12,11.7, 11.5,11.1,\ldots$ for $F(x)=0.5$ and they all work. Every number in the half open interval $(11,12]$ works for that. It just so happens that the definition of the quantile uses the infimum of this set to get a unique value, while the definition of median uses the arithemtic average of the end points to get a unique value. They are all the same for continuous random variables, but can differ for discrete (or mixed) ones.

Why that is so I don't know, my guess is that the concept of median was in use long before the concept of quantiles. It's a special value that exists only for $50$%; unlike quantiles, there is no "$70$% median". For that, using the avarage of the endpoints may have felt more natural and symmetric than the infimum.

0
On

If you define the median of a random variable $X$ as $m:\mathbb P(X\le m)\ge \frac12,\mathbb P(X\ge m)\ge \frac12$ then in your example, you would get all values in the interval $[11,12]$ as medians.

That is not satisfactory for a function, which should give a single value.

One option is to take the midpoint, as in your $11.5$, but this is not always desirable: for example the median of $X^3$ would be $1529.5$ which is not $11.5^3=1520.875$, losing a useful property of quantiles when the random variable is subject to a strictly increasing transformation.

The quantile function achieves the single value another way, by taking the infimum of the set of possible values. This may be seen as a more natural definition as all the possible values of the quantile function are in the support of the random variable. For example, with a quantile function defined that way, you can easily generate a sample value of the random variable, by taking $Q(U)$ where $U$ has a uniform distribution on $(0,1)$.