Search for probability and statistics terms on Statlect
StatLect

Quantile of a probability distribution

by , PhD

In this lecture we introduce and discuss the notion of quantile of the probability distribution of a random variable.

At the end of the lecture, we report some quantiles of the normal distribution, which are often used in hypothesis testing.

Table of Contents

Informal definition

We start with an informal definition.

The p-quantile of a random variable X is a value, denoted by [eq1], such that:

Thus, the quantile [eq4] is a cut-off point that divides the support of X in two parts:

Problems with the informal definition

There are important cases in which the informal definition works perfectly well. However, there are also many cases in which it is flawed. Let us see why.

Problem 1 - No solution

In the above definition, we require that[eq7]

Remember that the distribution function [eq8] of a random variable X is defined as[eq9]

Therefore, we are asking that[eq10]

However, we know that the distribution function may be discontinuous. In other words, it may jump and it may not take all the values between 0 and 1.

As a consequence, there may not exist a value [eq11] that satisfies equation (1). The distribution function may jump from a value lower than p to a value higher than p without ever being equal to p.

Problem 2 - More than one solution

The lack of existence of a solution to equation (1) is not the only problem.

In fact, not only the distribution function may jump, but it may also be flat over some intervals.

In other words, there may be more that one value of [eq12] that satisfies equation (1).

Plots showing all the problems that may arise when quantiles are defined in a naive manner.

How to solve the problems

How do we solve the two problems with the informal definition?

We start from problem 2: equation (1) may have more than one solution.

We could solve the problem by always choosing the smallest solution:[eq13]

But this would leave problem 1 unsolved: since equation (1) may have no solution, the set[eq14]may be empty.

To solve both problems, we minimize over the larger set [eq15]

Since any distribution function [eq8] converges to 1 as x goes to infinity, the latter set is never empty (provided that $p<1$).

Therefore, we define the quantile as[eq17]

Formal definition

What we have said can be summarized in the following formal definition.

Definition Let X be a random variable having distribution function [eq18]. Let [eq19]. The p-quantile of X, denoted by [eq20] is[eq21]

We have imposed the condition [eq19] because:

Example

Let us make an example.

Let X be a discrete random variable with support[eq25]and probability mass function[eq26]

The distribution function of X is[eq27]

Suppose that we want to compute the p-quantile for $p=0.2$.

There is no x such that[eq28]

However, the smallest x such that [eq29]is $x=0$ because [eq30] for $x<0$ and [eq31] for $x=0$.

Thus, we have[eq32]

Quantile function

When [eq33] is regarded as a function of p, that is, [eq34], it is called quantile function.

The quantile function is often denoted by[eq35]

Special cases

When the distribution function is continuous and strictly increasing on R, then the smallest x that satisfies[eq36]is the unique x that satisfies[eq37]

Furthermore, the distribution function has an inverse function $F_{X}^{-1}$ and we can write[eq38]

In this case, the quantile function coincides with the inverse of the distribution function:[eq39]

Example If a random variable X has a standardized Cauchy distribution, then its distribution function is[eq40]which is a continuous and strictly increasing function. The p-quantile of X is[eq41]

Special quantiles

Some quantiles have special names:

Quantiles of the normal distribution

Some quantiles of the standard normal distribution (i.e., the normal distribution having zero mean and unit variance) are often used as critical values in hypothesis testing.

The quantile function of a normal distribution is equal to the inverse of the distribution function since the latter is continuous and strictly increasing.

However, as we explained in the lecture on normal distribution values, the distribution function of a normal variable has no simple analytical expression.

Therefore, the quantiles of the normal distribution need to be looked up in a table or calculated with a computer algorithm.

We report in the table below some of the most commonly used quantiles.

Name of quantile Probability p Quantile Q(p)
First millile 0.001 -3.0902
Fifth millile 0.005 -2.5758
First percentile 0.010 -2.3263
Twenty-fifth millile 0.025 -1.9600
Fifth percentile 0.050 -1.6449
First decile 0.100 -1.2816
First quartile 0.250 -0.6745
Median 0.500 0
Third quartile 0.750 0.6745
Ninth decile 0.900 1.2816
Ninety-fifth percentile 0.950 1.6449
Nine-hundredth and seventy-fifth millile 0.975 1.9600
Ninety-ninth percentile 0.990 2.3263
Nine-hundredth and ninety-fifth millile 0.995 2.5758
Nine-hundredth and ninety-ninth millile 0.999 3.0902

Other definitions

The above definition of quantile of a distribution is the most common one in probability theory and mathematical statistics.

However, there are also other slightly different definitions. For a review, see https://mathworld.wolfram.com/Quantile.html.

How to cite

Please cite as:

Taboga, Marco (2021). "Quantile of a probability distribution", Lectures on probability theory and mathematical statistics. Kindle Direct Publishing. Online appendix. https://www.statlect.com/fundamentals-of-probability/quantile.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.