Quantile

The word quantile has no fewer than two distinct meanings in probability. Specific elements x in the range of a variate X are called quantiles, and denoted x (Evans et al. 2000, p. 5). This particular meaning has close ties to the so-called quantile function, a function which assigns to each probability p attained by a certain probability density function f=f(X) a value Q_f(p) defined by

 Q_f(p)={x:Pr(X<=x)=p}.
(1)

The kth n-tile P_k is that value of x, say x_k, which corresponds to a cumulative frequency of Nk/n (Kenney and Keeping 1962). If n=4, the quantity is called a quartile, and if n=100, it is called a percentile.

A parametrized version of quantile is implemented as Quantile[list, q, {{a, b}, {c, d}}], which returns

 q_(a,b;c,d)(X_1,...,X_N)=Y_(|_x_|)+(Y_([x])-Y_(|_x_|))(c+dfrac(x)),
(2)

where Y_i is the ith order statistic, |_x_| is the floor function, [x] is the ceiling function, frac(x) is the fractional part, and

 x=a+(N+b)q.
(3)

There are a number of slightly different definitions of the quantile that are in common use, as summarized in the following table.

#abcdplotting positiondescription
Q10010i/ninverted empirical CDF
Q2--------i/ninverted empirical CDF with averaging
Q31/2000(i+1/2)/nobservation numberer closest to qn
Q40001i/nCalifornia Department of Public Works method
Q51/2001(i-1/2)/nHazen's model (popular in hydrology)
Q60101i/(n+1)Weibull quantile
Q71-101(i-1)/(n-1)interpolation points divide sample range into n-1 intervals
Q81/31/301(i-1/3)/(n+1/3)unbiased median
Q93/81/401(i-3/8)/(n+1/4)approximate unbiased estimate for a normal distribution

The Wolfram Language's parametrization can handle all of these but Q2. In Q1, the empirical distribution function is the estimated cumulative proportion of the data set that does not exceed any specified value. Q2 is essentially the same as Q1 except that averages are taken at points of discontinuity. In Q3, the qth quantile is the observation numbered closest to qn, where n is the sample size. In Q4, the interpolation points divide the sample range into n intervals. In Q6, the vertices divide the sample into n+1 regions, each with probability 1/(n+1) on average. It was proposed by Weibull in 1939, and plots X_i at the mean position. Q7 divides the range into n-1 intervals, of which exactly 100q% lie to the left of q. Q8 plots X_i at the median position. Q9 is used in quantile-quantile plots. If P(X) is the normal distribution and p_k is the plotting position of X_k, then Q9(p_k) is an approximately unbiased estimate of P^(-1)(p_k).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.