Quantile

Quantiles are statistical parameters that divide the range of a random variable into two parts &mdash; values less than it and values greater than it &mdash; according to a given probability. More precisely, an &alpha;-quantile is a real number X&alpha; such that the random variable is less or equal to it with probability at least &alpha;, and greater or equal to it with probability at least (1–&alpha;). It is not possible to require equality because the probability of &alpha; may be positive. On the other hand, X&alpha; may not be uniquely determined because of gaps in the range of the random variable.

In descriptive statistics, some frequently used quantiles have names of their own: An &alpha;-quantile is
 * a median for $$\alpha=0.5$$
 * a (first) quartile for $$\alpha=0.25$$ and a (third quartile) for $$\alpha=0.75$$
 * a kth decile for $$\alpha={k\over10}$$
 * a kth percentile for $$ \alpha = {k\over100}$$

Moreover, for statistical tests the critical values (used to determine whether a result is significant or not) are quantiles of the test statistic.

Definition
For a real random variable $$X$$ and a real number $$\alpha$$, a real number $$ X_\alpha $$ is an $$\alpha$$-quantile if and only if
 * $$ P ( X \le X_\alpha ) \ge   \alpha

\quad\text{ and }\quad P ( X \ge X_\alpha ) \ge 1-\alpha $$

Remark: At least one of the inequalities is strict if $$ P(X=X_\alpha) >0 $$. and equality holds in both cases if $$ P(X=X_\alpha) = 0 $$.

Quantiles and the distribution function
Essentially, quantiles are the values of the inverse function to the (cumulative) distribution function, defined as $$ F(y) := P (X \le y) $$, with two exceptions:
 * F is monotone, but not strictly monotone. There may be (at most countably many) values for which the $$ F^{-1}(\{\alpha\}) $$ is a closed interval. In this case every element of that interval is an &alpha;-quantile. (For all these values equality holds in both cases).


 * The range of F may have (at most countably many) gaps (discontinuities). For values in one of these gaps $$ F^{-1}(\{\alpha\}) $$ is empty, but the quantile is unique. (These gaps correspond to those values X&alpha; that occur with positive probability.)