In

"Applying series expansion to the inverse beta distribution to find percentiles of the F-distribution"

''ACM Trans. Math. Softw.'', 9 (4), 478–480

Refinement of the Normal Quantile

New Methods for Managing "Student's" T Distribution

ACM Algorithm 396: Student's t-Quantiles

{{Theory of probability distributions Functions related to probability distributions pt:Quantil

probability
Probability is the branch of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained ...

and statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data
Data (; ) are individual facts, statistics, or items of information, often numeric. In a more technical sens ...

, the quantile
In statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data
Data (; ) are individual facts, statistics, or items of information, often numeric. In a mo ...

function, associated with a probability distribution
In probability theory
Probability theory is the branch of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces ...

of a random variable
A random variable is a variable whose values depend on outcomes of a random
In common parlance, randomness is the apparent or actual lack of pattern or predictability in events. A random sequence of events, symbols or steps often has no ...

, specifies the value of the random variable such that the probability of the variable being less than or equal to that value equals the given probability. Intuitively, the quantile function associates with a range at and below a probability input the likelihood that a random variable is realized in that range for some probability distribution. It is also called the percentile function, percent-point function or inverse cumulative distribution function.
Definition

With reference to a continuous and strictly monotonic distribution function, for example thecumulative distribution function
In probability theory
Probability theory is the branch of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and space ...

$F\_X\backslash colon\; R\; \backslash to;\; href="/html/ALL/s/,1.html"\; ;"title=",1">,1$random variable
A random variable is a variable whose values depend on outcomes of a random
In common parlance, randomness is the apparent or actual lack of pattern or predictability in events. A random sequence of events, symbols or steps often has no ...

''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)\; :=\; \backslash Pr(X\; \backslash le\; x)\; =\; p.\backslash ,$
Another way to express the quantile function, which extends to more general distribution functions (than only the continuous and strictly monotonic ones) is
:$Q(p)\backslash ,=\backslash ,\backslash inf\backslash left\backslash $
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 in the special case that the distribution is continuous. Note that the infimum function can be replaced by the minimum function, since the distribution function is right-continuous and weakly monotonically increasing.
The quantile is the unique function satisfying the Galois inequalities
:$Q(p)\; \backslash le\; x$ if and only if $p\; \backslash le\; F(x)$
If the function ''F'' is continuous and strictly monotonically increasing, then the inequalities can be replaced by equalities, and we have:
:$Q\; =\; F^$
In general, even though the distribution function ''F'' may fail to possess a left or right inverse, the quantile function ''Q'' behaves as an "almost sure left inverse" for the distribution function, in the sense that
: $Q(F(X))=X$ almost surely.
Simple example

For example, the cumulative distribution function of Exponential(''λ'') (i.e. intensity ''λ'' andexpected value
In probability theory
Probability theory is the branch of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and space ...

(mean
There are several kinds of mean in mathematics, especially in statistics.
For a data set, the ''arithmetic mean'', also known as arithmetic average, is a central value of a finite set of numbers: specifically, the sum of the values divided by ...

) 1/''λ'') is
:$F(x;\backslash lambda)\; =\; \backslash begin\; 1-e^\; \&\; x\; \backslash ge\; 0,\; \backslash \backslash \; 0\; \&\; x\; <\; 0.\; \backslash end$
The quantile function for Exponential(''λ'') is derived by finding the value of Q for which $1-e^\; =p$:
:$Q(p;\backslash lambda)\; =\; \backslash frac,\; \backslash !$
for 0 ≤ ''p'' < 1. The quartile
In statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data
Data (; ) are individual facts, statistics, or items of information, often numeric. In a mo ...

s are therefore:
; first quartile (p = 1/4): $-\backslash ln(3/4)/\backslash lambda\backslash ,$
; median
In statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data
Data (; ) are individual facts, statistics, or items of information, often numeric. In a m ...

(p = 2/4) : $-\backslash ln(1/2)/\backslash lambda\backslash ,$
; third quartile (p = 3/4) : $-\backslash ln(1/4)/\backslash lambda.\backslash ,$
Applications

Quantile functions are used in both statistical applications andMonte Carlo method
Monte Carlo methods, or Monte Carlo experiments, are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. The underlying concept is to use randomness to solve problems that might be determini ...

s.
The quantile function is one way of prescribing a probability distribution, and it is an alternative to the probability density function
In probability theory
Probability theory is the branch of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces ...

(pdf) or probability mass function
In probability
Probability is the branch of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which th ...

, the cumulative distribution function
In probability theory
Probability theory is the branch of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and space ...

(cdf) and the characteristic functionIn mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ha ...

. The quantile function, ''Q'', of a probability distribution is the inverse
Inverse or invert may refer to:
Science and mathematics
* Inverse (logic), a type of conditional sentence which is an immediate inference made from another conditional sentence
* Additive inverse (negation), the inverse of a number that, when add ...

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.
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
In statistical hypothesis testing
A statistical hypothesis test is a method of statistical inference used to determine a possible conclusion from two different, and likely conflicting, hypotheses.
In a statistical hypothesis test, a null hypothe ...

of an observation whose distribution is known; see the quantile
In statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data
Data (; ) are individual facts, statistics, or items of information, often numeric. In a mo ...

entry. Before the popularization of computers, it was not uncommon for books to have appendices with statistical tables sampling the quantile function. Statistical applications of quantile functions are discussed extensively by Gilchrist.
Monte-Carlo simulations employ quantile functions to produce non-uniform random or pseudorandom number
A pseudorandom sequence of numbers is one that appears to be statistically randomA numeric sequence is said to be statistically random when it contains no recognizable patterns or regularities; sequences such as the results of an ideal dice, dice ...

s 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 of simulation methods, for example in modern computational finance
Computational finance is a branch of applied computer science
Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application.
...

, 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 and Monte Carlo methods in finance
Monte may refer to:
Places Argentina
* Argentine Monte
The Argentine Monte (NT0802), or Low Monte, is an ecoregion of dry thorn scrub and grasslands in Argentina. It is one of the driest regions in the country.
Human settlements are mainly near w ...

.
Calculation

The evaluation of quantile functions often involvesnumerical methods
Numerical analysis is the study of algorithm
In and , an algorithm () is a finite sequence of , computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algorithms are always and are used as ...

, such as the exponential distribution above, which is one of the few distributions where a closed-form expression
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

can be found (others include the uniform
A uniform is a variety of clothing
A kanga, worn throughout the African Great Lakes region
Clothing (also known as clothes, apparel, and attire) are items worn on the body. Typically, clothing is made of fabrics or textiles, but over ti ...

, the Weibull
Weibull is a Swedish language, Swedish locational surname. The Weibull family share the same roots as the Danish / Norwegian noble family of Falsen (noble family), Falsen]They originated from and were named after the village of Weiböl in Widstedts ...

, the Tukey lambda distribution, 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
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and th ...

such as the bisection method
In mathematics, the bisection method is a Root-finding algorithm, root-finding method that applies to any continuous functions for which one knows two values with opposite signs. The method consists of repeatedly Bisection, bisecting the Interv ...

to invert the cdf. Other algorithms to evaluate quantile functions are given in the Numerical Recipes
''Numerical Recipes'' is the generic title of a series of books on algorithm
In and , an algorithm () is a finite sequence of , computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algori ...

series of books. Algorithms for common distributions are built into many statistical software
Statistical software are specialized computer program
In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret. In declarative programming, a ''computer progra ...

packages.
Quantile functions may also be characterized as solutions of non-linear ordinary and partial differential equation
In mathematics, a differential equation is an equation
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained ( ...

s. The ordinary differential equation
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

s for the cases of the , Student
A student is primarily a person enrolled in a school
A school is an educational institution designed to provide learning spaces and learning environments for the teaching of students under the direction of teachers. Most countries h ...

, beta
Beta (, ; uppercase , lowercase , or cursive
Cursive (also known as script, among other names) is any style of penmanship
Penmanship is the technique of writing
Writing is a medium of human communication that involves the represen ...

and gamma
Gamma (uppercase , lowercase ; ''gámma'') is the third letter of the Greek alphabet
The Greek alphabet has been used to write the Greek language since the late ninth or early eighth century BC. It is derived from the earlier Phoenician ...

distributions have been given and solved.
Normal distribution

Thenormal distribution
In probability theory
Probability theory is the branch of concerned with . Although there are several different , probability theory treats the concept in a rigorous mathematical manner by expressing it through a set of . Typically these ...

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
In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution. It has applications in data analysis and machine learning, in particular Q–Q plot, exploratory statistical gra ...

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 and Acklam. Non-composite rational approximations have been developed by Shaw.
Ordinary differential equation for the normal quantile

A non-linear ordinary differential equation for the normal quantile, ''w''(''p''), may be given. It is :$\backslash frac\; =\; w\; \backslash left(\backslash frac\backslash right)^2$ with the centre (initial) conditions :$w\backslash left(1/2\backslash right)\; =\; 0,\backslash ,$ :$w\text{'}\backslash left(1/2\backslash right)\; =\; \backslash sqrt.\backslash ,$ 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).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. The simple cases are as follows: ;ν = 1 (Cauchy distribution) :$Q(p)\; =\; \backslash tan\; (\backslash pi(p-1/2))\; \backslash !$ ;ν = 2 :$Q(p)\; =\; 2(p-1/2)\backslash sqrt\backslash !$ ;ν = 4 :$Q(p)\; =\; \backslash operatorname(p-1/2)\backslash ,2\backslash ,\backslash sqrt\backslash !$ where :$q\; =\; \backslash frac\backslash !$ and :$\backslash alpha\; =\; 4p(1-p).\backslash !$ 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)=\backslash sum\_^a\_i\; Q\_i(p)$, where $Q\_i(p)$, $i=1,\backslash ldots,m$ are quantile functions and $a\_i$, $i=1,\backslash 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.Non-linear differential equations for quantile functions

The non-linear ordinary differential equation given fornormal distribution
In probability theory
Probability theory is the branch of concerned with . Although there are several different , probability theory treats the concept in a rigorous mathematical manner by expressing it through a set of . Typically these ...

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
:$\backslash frac\; =\; H(Q)\; \backslash left(\backslash frac\backslash right)^2$
augmented by suitable boundary conditions, where
:$H(x)\; =\; -\backslash frac$
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

*Inverse transform sampling Inverse transform sampling (also known as inversion sampling, the inverse probability integral transform, the inverse transformation method, Smirnov transform, or the golden ruleAalto University, N. Hyvönen, Computational methods in inverse proble ...

* Percent point
* Quantile
In statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data
Data (; ) are individual facts, statistics, or items of information, often numeric. In a mo ...

* Rank-size distribution
Rank-size distribution is the distribution of size by rank, in decreasing order of size. For example, if a data set consists of items of sizes 5, 100, 5, and 8, the rank-size distribution is 100, 8, 5, 5 (ranks 1 through 4). This is also known as th ...

References

Further reading

*Abernathy, Roger W. and Smith, Robert P. (1993)"Applying series expansion to the inverse beta distribution to find percentiles of the F-distribution"

''ACM Trans. Math. Softw.'', 9 (4), 478–480

Refinement of the Normal Quantile

New Methods for Managing "Student's" T Distribution

ACM Algorithm 396: Student's t-Quantiles

{{Theory of probability distributions Functions related to probability distributions pt:Quantil