web.archive.org

Quantile function: Information from Answers.com

See also quantile.

In probability theory, a quantile function of a probability distribution is the inverse F −1 of its cumulative distribution function (cdf) F. Assuming a continuous and strictly monotonic distribution function, \scriptstyle F\colon R \to (0,1), the quantile function returns the value below which random draws from the given distribution would fall, p×100 percent of the time. That is, it returns the value of x such that

\Pr(X \le x) = p.\,

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. In either case, the quantile function is

F^{-1}(p) = \inf\left\{ x\in R : p \le F(x) \right\}

for a probability 0 < p < 1, and the quantile function returns the minimum value of x for which the previous probability statement holds.

Simple example

For example, the quantile function for Exponential(λ) is

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

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

first quartile 
\ln(4/3)/\lambda\,
median 
\ln(2)/\lambda\,
third quartile 
\ln(4)/\lambda\,

Applications

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. Statistical applications of quantile functions are discussed extensively by Gilchrist (2000).

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 (see Jackel, 2002) and Monte Carlo methods in finance.

Calculation

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, Weibull, logistic and 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 in to 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 (see Steinbrecher and Shaw, 2008).

The normal distribution

The normal distribution is perhaps the most important case, and, in the absence of a simple formula, approximate representations are usually used. Thorough composite rational and polynomial approximations have been given by Wichura (1988) and Acklam (see his web site in External Links). Also see the entry on the probit function.

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 (see Shaw (2006) for details). The simple cases are as follows:

ν = 1 (Cauchy distribution)

F^{-1}(p) = \tan (\pi(p-1/2)) \!

ν = 2

F^{-1}(p) = \frac{2p-1}{\sqrt{2p(1-p)}} \!

ν = 4

F^{-1}(p) = \operatorname{sign}(p-1/2)\sqrt{q-4}\!

where

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

and

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

See also

References

  • Gilchrist, W. (2000). Statistical Modelling with Quantile Functions.
  • Jaeckel, P. (2002). Monte Carlo methods in finance.
  • Wichura, M.J. (1988). "Algorithm AS241: The Percentage Points of the Normal Distribution". Applied Statistics 37: 477–484. doi:10.2307/2347330.
  • Shaw, W.T. (2006). "Sampling Student’s T distribution – use of the inverse cumulative distribution function.". Journal of Computational Finance 9 (4): 37–73.
  • Steinbrecher, G., Shaw, W.T. (2008). "Quantile mechanics". European Journal of Applied Mathematics 19 (2): 87–112. doi:10.1017/S0956792508007341.

External links

  • [1] An algorithm for computing the inverse normal cumulative distribution function.
  • [2] Refinement of the Normal Quantile
  • [3] New Method's for Managing "Student's" T Distribution
  • [4] ACM Algorithm 396: Student's t-Quantiles
  • [5] Applying series expansion to the inverse beta distribution to find percentiles of the F-distribution

This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)