World Library  
Flag as Inappropriate
Email this Article

Quantile function

Article Id: WHEBN0010167616
Reproduction Date:

Title: Quantile function  
Author: World Heritage Encyclopedia
Language: English
Subject: Exponential distribution, Cauchy distribution, Inverse transform sampling, Quantile, Characteristic function (probability theory)
Publisher: World Heritage Encyclopedia

Quantile function

In probability and statistics, the quantile function specifies, for a given probability in the probability distribution of a random variable, the value at which the probability of the random variable will be less than or equal to that probability. It is also called the percent point function or inverse cumulative distribution function. The quantile function is one way of prescribing a probability distribution, and it is an alternative to the probability density function (pdf) or probability mass function, the cumulative distribution function (cdf) and the characteristic function. The quantile function, Q, of a probability distribution is the inverse of its cumulative distribution function F. The derivative of the quantile function, namely the quantile density function, is yet another way of prescribing a probability distribution. It is the reciprocal of the pdf composed with the quantile function.


With reference to a continuous and strictly monotonic distribution function, for example the cumulative distribution function \scriptstyle F_X\colon R \to [0,1] of a random variable X, the quantile function Q returns a threshold value x below which random draws from the given c.d.f would fall p percent of the time.

In terms of the distribution function F, the quantile function Q returns the value x such that

F_X(x) := \Pr(X \le x) = p.\,
Quantile function for a general distribution function

Another way to express the quantile function is

Q(p)\,=\,\inf\left\{ x\in \mathbb{R} : p \le F(x) \right\}

for a probability 0 < p < 1. Here we capture the fact that the quantile function returns the minimum value of x from amongst all those values whose c.d.f value exceeds p, which is equivalent to the previous probability statement.

Note: if the probability distribution is discrete rather than continuous then there may be gaps between values in the domain of its cdf, while if the cdf is only weakly monotonic there may be "flat spots" in its range.

Simple example

For example, the quantile function for Exponential(λ) (i.e. intensity λ and expected value (mean) 1/λ) is

Q(p;\lambda) = \frac{-\ln(1-p)}{\lambda}, \!

for 0 ≤ p < 1. The quartiles are therefore:

first quartile (p = 1/4)
median (p = 2/4)
third quartile (p = 3/4)


Quantile functions are used in both statistical applications and Monte Carlo methods.

For statistical applications, users need to know key percentage points of a given distribution. For example, they require the median and 25% and 75% quartiles as in the example above or 5%, 95%, 2.5%, 97.5% levels for other applications such as assessing the statistical significance of an observation whose distribution is known; see the quantile entry. Before the popularization of computers, it was not uncommon for books to have appendices with statistical tables sampling the quantile function (see, e.g., [1]). Statistical applications of quantile functions are discussed extensively by Gilchrist.[1]

Monte-Carlo simulations employ quantile functions to produce non-uniform random or pseudorandom numbers for use in diverse types of simulation calculations. A sample from a given distribution may be obtained in principle by applying its quantile function to a sample from a uniform distribution. The demands, for example, of simulation methods in modern computational finance are focusing increasing attention on methods based on quantile functions, as they work well with multivariate techniques based on either copula or quasi-Monte-Carlo methods[2] and Monte Carlo methods in finance.


The evaluation of quantile functions often involves numerical methods, as the example of the exponential distribution above is one of the few distributions where a closed-form expression can be found (others include the uniform, the Weibull, the Tukey lambda (which includes the logistic) and the log-logistic). When the cdf itself has a closed-form expression, one can always use a numerical root-finding algorithm such as the bisection method to invert the cdf. Other algorithms to evaluate quantile functions are given in the Numerical Recipes series of books. Algorithms for common distributions are built into many statistical software packages.

Quantile functions may also be characterized as solutions of non-linear ordinary and partial differential equations. The ordinary differential equations for the cases of the normal, Student, beta and gamma distributions have been given and solved.[3]

The normal distribution

The normal distribution is perhaps the most important case. Because the normal distribution is a location-scale family, its quantile function for arbitrary parameters can be derived from a simple transformation of the quantile function of the standard normal distribution, known as the probit function. Unfortunately, this function has no closed-form representation using basic algebraic functions; as a result, approximate representations are usually used. Thorough composite rational and polynomial approximations have been given by Wichura[4] and Acklam (see his web site in External Links). Non-composite rational approximations have been developed by Shaw (see Monte Carlo recycling in External Links).

Ordinary differential equation for the normal quantile

A non-linear ordinary differential equation for the normal quantile, w(p), may be given. It is

\frac{d^2 w}{d p^2} = w \left(\frac{d w}{d p}\right)^2

with the centre (boundary) conditions

w\left(1/2\right) = 0,\,
w'\left(1/2\right) = \sqrt{2\pi}.\,

This equation may be solved by several methods, including the classical power series approach. From this solutions of arbitrarily high accuracy may be developed (see Steinbrecher and Shaw, 2008).

The Student's t-distribution

This has historically been one of the more intractable cases, as the presence of a parameter, ν, the degrees of freedom, makes the use of rational and other approximations awkward. Simple formulas exist when the ν = 1, 2, 4 and the problem may be reduced to the solution of a polynomial when ν is even. In other cases the quantile functions may be developed as power series.[5] The simple cases are as follows:

ν = 1 (Cauchy distribution)

Q(p) = \tan (\pi(p-1/2)) \!

ν = 2

Q(p) = 2(p-1/2)\sqrt{\frac{2}{\alpha}}\!

ν = 4

Q(p) = \operatorname{sign}(p-1/2)\,2\,\sqrt{q-1}\!


q = \frac{\cos \left( \frac{1}{3} \arccos \left( \sqrt{\alpha} \, \right) \right)}{\sqrt{\alpha}}\!


\alpha = 4p(1-p).\!

In the above the "sign" function is +1 for positive arguments, -1 for negative arguments and zero at zero. It should not be confused with the trigonometric sine function.

Quantile mixtures

Analogously to the mixtures of densities, distributions can be defined as quantile mixtures

Q(p)=\sum_{i=1}^{m}a_i Q_i(p),

where Q_i(p), i=1,\ldots,m are quantile functions and a_i, i=1,\ldots,m are the model parameters. The parameters a_i must be selected so that Q(p) is a quantile function. Two four-parametric quantile mixtures, the normal-polynomial quantile mixture and the Cauchy-polynomial quantile mixture, are presented by Karvanen.[6]

Non-linear differential equations for quantile functions

The non-linear ordinary differential equation given for normal distribution is a special case of that available for any quantile function whose second derivative exists. In general the equation for a quantile, Q(p), may be given. It is

\frac{d^2 Q}{d p^2} = H(Q) \left(\frac{d Q}{d p}\right)^2

augmented by suitable boundary conditions, where

H(x) = -\frac{d \log[f(x)]}{dx}

and ƒ(x) is the probability density function. The forms of this equation, and its classical analysis by series and asymptotic solutions, for the cases of the normal, Student, gamma and beta distributions has been elucidated by Steinbrecher and Shaw (2008). Such solutions provide accurate benchmarks, and in the case of the Student, suitable series for live Monte Carlo use.

See also


  1. ^ Gilchrist, W. (2000). Statistical Modelling with Quantile Functions.  
  2. ^ Jaeckel, P. (2002). Monte Carlo methods in finance. 
  3. ^ Steinbrecher, G., Shaw, W.T. (2008). "Quantile mechanics". European Journal of Applied Mathematics 19 (2): 87–112.  
  4. ^ Wichura, M.J. (1988). "Algorithm AS241: The Percentage Points of the Normal Distribution". Applied Statistics (Blackwell Publishing) 37 (3): 477–484.  
  5. ^ Shaw, W.T. (2006). "Sampling Student’s T distribution – Use of the inverse cumulative distribution function.". Journal of Computational Finance 9 (4): 37–73. 
  6. ^ Karvanen, J. (2006). "Estimation of quantile mixtures via L-moments and trimmed L-moments.". Computational Statistics & Data Analysis 51 (2): 947–956.  

External links

  • An algorithm for computing the inverse normal cumulative distribution function
  • Refinement of the Normal Quantile
  • New Methods for Managing "Student's" T Distribution
  • ACM Algorithm 396: Student's t-Quantiles
  • Computational Finance: Differential Equations for Monte Carlo Recycling
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.