Education
 

Quantile

From Psychology Wiki

Template:Stats Psy Quantiles are essentially points taken at regular intervals from the cumulative distribution function of a random variable. Dividing ordered data into q essentially equal-sized data subsets is the motivation for q-quantiles; the quantiles are the data values marking the boundaries between consecutive subsets. Put another way, the kth quantile is the value x such that the probability that a random variable will be less than x is about k/q. There are q − 1 quantiles, with k an integer satisfying 0 < k < q.

Some quantiles have special names:

Some software programs regard the minimum and maximum as the 0th and 100th percentile, respectively; however, such terminology is an extension beyond traditional statistics definitions. For an infinite population, the kth quantile is the data value where the cumulative distribution function is equal to k/q. For a finite N sample size, calculate math--if this is not an integer, then only use the integer part via the Floor function to get the appropriate sample number (assuming samples ordered by increasing value, with the first sample having a sample number of zero.); if it is not an integer it is conventional to take the weighted average of the two sample values (see Calculating the quantiles ).

More formally: the kth quantile math of the population parameter X can be defined such that:

math where math

If instead of taking k and q as integers, the k-quantile is based on a real number k with 0<k<1 then this becomes: the k-quantile of the distribution of a random variable X can be defined as the value(s) x such that:

math


Standardized test results are commonly misinterpreted as a student scoring "in the 80th percentile", for example, as if the 80th percentile is an interval to score "in", which it is not; one can score "at" some percentile or between two percentiles, but not "in" some percentile.

Quantiles are useful measures because they are less susceptible to long tailed distributions and outliers. For instance, with a random variable that has an exponential distribution, any particular sample of this random variable will have roughly a 63% chance of being less than the mean. This is because the exponential distribution has a long tail for positive values, but is zero for negative numbers.

Empirically, if the data you are analyzing are not actually distributed according to your assumed distribution, or if you have other potential sources for outliers that are far removed from the mean, then quantiles may be more useful descriptive statistics than means and other moment related statistics.

Closely related is the subject of robust regression in which the sum of the absolute value of the observed errors is used in place of the squared error. The connection is that the mean is the single estimate of a distribution that minimizes expected squared error while the median minimizes expected absolute error. Robust regression shares the ability to be relatively insensitive to large deviations in outlying observations.

The quantiles of a random variable are generally preserved under increasing transformations, in the sense that for example if m is the median of a random variable X then 2m is the median of 2X, unless an arbitrary choice has been made from a range of values to specify a particular quantile. Quantiles can also be used in cases where only ordinal data is available.

[edit] Calculating the quantiles

There are several methods for calculating the quantiles:

Let N be the number of nonmissing values of the sample population, and let math represent the ordered values of the sample population such that math is the smallest value, etc. For the kth quantile between 0 and N, let math. Then define math as the integer part of math and math as the fractional part.

Weighted average 
math
Empirical distribution function 
math
Empirical distribution function with averaging 
math
Sample number closest to math 
WikiTeX: latex reported a failure, namely:
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode (./49ddc21162b78a19ba775120cd1c5 LaTeX2e <2003/12/01> Babel and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size10.clo)) (/usr/share/texmf/tex/latex/amsfonts/amssymb.sty (/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty)) (/usr/share/texmf/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/share/texmf/tex/latex/amsmath/amstext.sty (/usr/share/texmf/tex/latex/amsmath/amsgen.sty)) (/usr/share/texmf/tex/latex/amsmath/amsbsy.sty) (/usr/share/texmf/tex/latex/amsmath/amsopn.sty)) (/usr/share/texmf/tex/latex/amsmath/amscd.sty) (/usr/share/texmf/tex/latex/concmath/concmath.sty) (./49ddc21162b78a19ba775120cd1c5.aux) (/usr/share/texmf/tex/latex/concmath/ot1ccr.fd) (/usr/share/texmf/tex/latex/concmath/omlccm.fd) (/usr/share/texmf/tex/latex/concmath/omsccsy.fd) (/usr/share/texmf/tex/latex/concmath/omxccex.fd) (/usr/share/texmf/tex/latex/amsfonts/umsa.fd) (/usr/share/texmf/tex/latex/amsfonts/umsb.fd) ! LaTeX Error: \begin{cases} on input line 5 ended by \end{equation*}. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.5 ...dot p}=\begin{cases}x_j, & g\end{equation*} ! Missing $ inserted. $ l.5 ...dot p}=\begin{cases}x_j, & g\end{equation*} ! Missing } inserted. } l.5 ...dot p}=\begin{cases}x_j, & g\end{equation*} ! Missing \cr inserted. \cr l.5 ...dot p}=\begin{cases}x_j, & g\end{equation*} ! Missing $ inserted. $ l.5 ...dot p}=\begin{cases}x_j, & g\end{equation*} ! Missing } inserted. } l.5 ...dot p}=\begin{cases}x_j, & g\end{equation*} ! Missing \right. inserted. \right . l.5 ...dot p}=\begin{cases}x_j, & g\end{equation*} ! LaTeX Error: \begin{equation*} on input line 5 ended by \end{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.6 \end{document} ! Missing $ inserted. $ l.6 \end{document} ! Display math should end with $$. \par l.6 \end{document} [1] (./49ddc21162b78a19ba775120cd1c5.aux) ) (\end occurred inside a group at level 1) ### semi simple group (level 1) entered at line 5 (\begingroup) ### bottom level (see the transcript file for additional information) Output written on 49ddc21162b78a19ba775120cd1c5.dvi (1 page, 460 bytes). Transcript written on 49ddc21162b78a19ba775120cd1c5.log.

[edit] See also

fr:Quantilefi:Kvantiili

Smallwikipedialogo.png This page uses content from the English-language version of Wikipedia. The original article was at Quantile. The list of authors can be seen in the page history. As with Psychology Wiki, the text of Wikipedia is available under the GNU Free Documentation License.