HOME

TheInfoList



OR:

In
statistics Statistics (from German: '' Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, indust ...
and
probability Probability is the branch of mathematics concerning numerical descriptions of how likely an event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and 1, where, roughly speaking, ...
, quantiles are cut points dividing the range of a
probability distribution In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon ...
into continuous intervals with equal probabilities, or dividing the
observations Observation is the active acquisition of information from a primary source. In living beings, observation employs the senses. In science, observation can also involve the perception and recording of data via the use of scientific instrument ...
in a
sample Sample or samples may refer to: Base meaning * Sample (statistics), a subset of a population – complete data set * Sample (signal), a digital discrete sample of a continuous analog signal * Sample (material), a specimen or small quantity of ...
in the same way. There is one fewer quantile than the number of groups created. Common quantiles have special names, such as ''
quartile In statistics, a quartile is a type of quantile which divides the number of data points into four parts, or ''quarters'', of more-or-less equal size. The data must be ordered from smallest to largest to compute quartiles; as such, quartiles are a ...
s'' (four groups), ''
decile In descriptive statistics, a decile is any of the nine values that divide the sorted data into ten equal parts, so that each part represents 1/10 of the sample or population. A decile is one possible form of a quantile; others include the quartile ...
s'' (ten groups), and ''
percentile In statistics, a ''k''-th percentile (percentile score or centile) is a score ''below which'' a given percentage ''k'' of scores in its frequency distribution falls (exclusive definition) or a score ''at or below which'' a given percentage fall ...
s'' (100 groups). The groups created are termed halves, thirds, quarters, etc., though sometimes the terms for the quantile are used for the groups created, rather than for the cut points. -quantiles are values that partition a
finite set In mathematics, particularly set theory, a finite set is a set that has a finite number of elements. Informally, a finite set is a set which one could in principle count and finish counting. For example, :\ is a finite set with five elements. T ...
of values into
subsets In mathematics, set ''A'' is a subset of a set ''B'' if all elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are unequal, then ''A'' is a proper subset o ...
of (nearly) equal sizes. There are partitions of the -quantiles, one for each
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
satisfying . In some cases the value of a quantile may not be uniquely determined, as can be the case for the
median In statistics and probability theory, the median is the value separating the higher half from the lower half of a data sample, a population, or a probability distribution. For a data set, it may be thought of as "the middle" value. The basic f ...
(2-quantile) of a uniform probability distribution on a set of even size. Quantiles can also be applied to
continuous Continuity or continuous may refer to: Mathematics * Continuity (mathematics), the opposing concept to discreteness; common examples include ** Continuous probability distribution or random variable in probability and statistics ** Continuous g ...
distributions, providing a way to generalize
rank statistics A ranking is a relationship between a set of items such that, for any two items, the first is either "ranked higher than", "ranked lower than" or "ranked equal to" the second. In mathematics, this is known as a weak order or total preorder of ...
to continuous variables (see
percentile rank In statistics, the percentile rank (PR) of a given score is the percentage of scores in its frequency distribution that are less than that score. Its mathematical formula is : PR = \frac \times 100, where ''CF''—the cumulative frequency—i ...
). When the
cumulative distribution function In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x. Eve ...
of a
random variable A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
is known, the -quantiles are the application of the''
quantile function In probability and statistics, the quantile function, associated with a probability distribution of a random variable, specifies the value of the random variable such that the probability of the variable being less than or equal to that value equ ...
'' (the
inverse function In mathematics, the inverse function of a function (also called the inverse of ) is a function that undoes the operation of . The inverse of exists if and only if is bijective, and if it exists, is denoted by f^ . For a function f\colon X ...
of the
cumulative distribution function In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x. Eve ...
) to the values .


Specialized quantiles

Some -quantiles have special names: *The only 2-quantile is called the
median In statistics and probability theory, the median is the value separating the higher half from the lower half of a data sample, a population, or a probability distribution. For a data set, it may be thought of as "the middle" value. The basic f ...
*The 3-quantiles are called tertiles or
tercile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile th ...
s → T *The 4-quantiles are called
quartile In statistics, a quartile is a type of quantile which divides the number of data points into four parts, or ''quarters'', of more-or-less equal size. The data must be ordered from smallest to largest to compute quartiles; as such, quartiles are a ...
s → Q; the difference between upper and lower quartiles is also called the
interquartile range In descriptive statistics, the interquartile range (IQR) is a measure of statistical dispersion, which is the spread of the data. The IQR may also be called the midspread, middle 50%, fourth spread, or H‑spread. It is defined as the differen ...
, midspread or middle fifty → IQR = . *The 5-quantiles are called
quintile Quintile may refer to: *In statistics, a quantile In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a ...
s or
pentile PenTile matrix is a family of patented subpixel matrix schemes used in electronic device displays. PenTile is a trademark of Samsung. PenTile matrices are used in AMOLED and LCD displays. These subpixel layouts are specifically designed to opera ...
s → QU *The 6-quantiles are called
sextile In astrology, an aspect is an angle that planets make to each other in the Horoscope; as well as to the Ascendant, Midheaven, Descendant, Lower Midheaven, and other points of astrological interest. As viewed from Earth, aspects are measured ...
s → S *The 7-quantiles are called septiles → SP *The 8-quantiles are called octiles → O *The 10-quantiles are called
decile In descriptive statistics, a decile is any of the nine values that divide the sorted data into ten equal parts, so that each part represents 1/10 of the sample or population. A decile is one possible form of a quantile; others include the quartile ...
s → D *The 12-quantiles are called duo-deciles or dodeciles → DD *The 16-quantiles are called hexadeciles → H *The 20-quantiles are called
ventile Ventile, is a registered trademark used to brand a special high-quality woven cotton fabric first developed by scientists at the Shirley Institute in Manchester, England. Originally created to overcome a shortage of flax used for fire hoses and wa ...
s, vigintiles, or demi-deciles → V *The 100-quantiles are called
percentile In statistics, a ''k''-th percentile (percentile score or centile) is a score ''below which'' a given percentage ''k'' of scores in its frequency distribution falls (exclusive definition) or a score ''at or below which'' a given percentage fall ...
s or centiles → P * The 1000-quantiles have been called permilles or milliles, but these are rare and largely obsoleteHelen Mary Walker, Joseph Lev, ''Elementary Statistical Methods'', 1969, . 60 https://books.google.com/books?id=ogYnAQAAIAAJ&dq=permille/ref>


Quantiles of a population

As in the computation of, for example,
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, whil ...
, the estimation of a quantile depends upon whether one is operating with a
statistical population In statistics, a population is a set of similar items or events which is of interest for some question or experiment. A statistical population can be a group of existing objects (e.g. the set of all stars within the Milky Way galaxy) or a hypoth ...
or with a
sample Sample or samples may refer to: Base meaning * Sample (statistics), a subset of a population – complete data set * Sample (signal), a digital discrete sample of a continuous analog signal * Sample (material), a specimen or small quantity of ...
drawn from it. For a population, of discrete values or for a continuous population density, the -th -quantile is the data value where the cumulative distribution function crosses . That is, is a -th -quantile for a variable if : or, equivalently, and : . For a finite population of equally probable values indexed from lowest to highest, the -th -quantile of this population can equivalently be computed via the value of . If is not an integer, then round up to the next integer to get the appropriate index; the corresponding data value is the -th -quantile. On the other hand, if is an integer then any number from the data value at that index to the data value of the next index can be taken as the quantile, and it is conventional (though arbitrary) to take the average of those two values (see Estimating quantiles from a sample). If, instead of using integers and , the "-quantile" is based on a
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every ...
with then replaces in the above formulas. This broader terminology is used when quantiles are used to parameterize continuous probability distributions. Moreover, some software programs (including
Microsoft Excel Microsoft Excel is a spreadsheet developed by Microsoft for Microsoft Windows, Windows, macOS, Android (operating system), Android and iOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a macro (comp ...
) regard the minimum and maximum as the 0th and 100th percentile, respectively. However, this broader terminology is an extension beyond traditional statistics definitions.


Examples

The following two examples use the Nearest Rank definition of quantile with rounding. For an explanation of this definition, see
percentile In statistics, a ''k''-th percentile (percentile score or centile) is a score ''below which'' a given percentage ''k'' of scores in its frequency distribution falls (exclusive definition) or a score ''at or below which'' a given percentage fall ...
s.


Even-sized population

Consider an ordered population of 10 data values , 6, 7, 8, 8, 10, 13, 15, 16, 20 What are the 4-quantiles (the "quartiles") of this dataset? So the first, second and third 4-quantiles (the "quartiles") of the dataset , 6, 7, 8, 8, 10, 13, 15, 16, 20 are
, 9, 15 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
If also required, the zeroth quartile is 3 and the fourth quartile is 20.


Odd-sized population

Consider an ordered population of 11 data values
, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
What are the 4-quantiles (the "quartiles") of this dataset? So the first, second and third 4-quantiles (the "quartiles") of the dataset
, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
are
, 9, 15 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
If also required, the zeroth quartile is 3 and the fourth quartile is 20.


Relationship to the mean

For any population probability distribution on finitely many values, and generally for any probability distribution with a mean and variance, it is the case that \mu - \sigma\cdot\sqrt \le Q(p) \le \mu + \sigma\cdot\sqrt\,, where is the value of the -quantile for (or equivalently is the -th -quantile for ), where is the distribution's
arithmetic mean In mathematics and statistics, the arithmetic mean ( ) or arithmetic average, or just the '' mean'' or the ''average'' (when the context is clear), is the sum of a collection of numbers divided by the count of numbers in the collection. The co ...
, and where is the distribution's
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, whil ...
. In particular, the median is never more than one standard deviation from the mean. The above formula can be used to bound the value in terms of quantiles. When , the value that is standard deviations above the mean has a lower bound \mu + z \sigma \ge Q\left(\frac\right)\,,\mathrm z \ge 0. For example, the value that is standard deviation above the mean is always greater than or equal to , the median, and the value that is standard deviations above the mean is always greater than or equal to , the fourth quintile. When , there is instead an upper bound \mu + z \sigma \le Q\left(\frac\right)\,,\mathrm z \le 0. For example, the value for will never exceed , the first decile.


Estimating quantiles from a sample

One problem which frequently arises is estimating a quantile of a (very large or infinite) population based on a finite sample of size . The asymptotic distribution of the -th sample quantile is well-known: it is asymptotically normal around the -th population quantile with variance equal to : \frac where is the value of the distribution density at the -th population quantile. However, this distribution relies on knowledge of the population distribution; which is equivalent to knowledge of the population quantiles, which we are trying to estimate! Modern statistical packages thus rely on a different technique — or selection of techniques — to
estimate Estimation (or estimating) is the process of finding an estimate or approximation, which is a value that is usable for some purpose even if input data may be incomplete, uncertain, or unstable. The value is nonetheless usable because it is de ...
the quantiles. Hyndman and Fan compiled a
taxonomy Taxonomy is the practice and science of categorization or classification. A taxonomy (or taxonomical classification) is a scheme of classification, especially a hierarchical classification, in which things are organized into groups or types. ...
of nine algorithms used by various software packages. All methods compute , the estimate for the -quantile (the -th -quantile, where ) from a sample of size by computing a real valued index . When is an integer, the -th smallest of the values, , is the quantile estimate. Otherwise a rounding or interpolation scheme is used to compute the quantile estimate from , , and . (For notation, see
floor and ceiling functions In mathematics and computer science, the floor function is the function that takes as input a real number , and gives as output the greatest integer less than or equal to , denoted or . Similarly, the ceiling function maps to the least int ...
). The first three are piecewise constant, changing abruptly at each data point, while the last six use linear interpolation between data points, and differ only in how the index used to choose the point along the piecewise linear interpolation curve, is chosen.
Mathematica Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning, statistics, symbolic computation, data manipulation, network analysis, time series analysis, NLP, optimiza ...
,
Matlab MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
, R and
GNU Octave GNU Octave is a high-level programming language primarily intended for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a lan ...
programming languages support all nine sample quantile methods. SAS includes five sample quantile methods,
SciPy SciPy (pronounced "sigh pie") is a free and open-source Python library used for scientific computing and technical computing. SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, ...
and
Maple ''Acer'' () is a genus of trees and shrubs commonly known as maples. The genus is placed in the family Sapindaceae.Stevens, P. F. (2001 onwards). Angiosperm Phylogeny Website. Version 9, June 2008 nd more or less continuously updated since h ...
both include eight,
EViews EViews is a statistical package for Windows, used mainly for time-series oriented econometric analysis. It is developed by Quantitative Micro Software (QMS), now a part of IHS. Version 1.0 was released in March 1994, and replaced MicroTSP. T ...
includes the six piecewise linear functions,
Stata Stata (, , alternatively , occasionally stylized as STATA) is a general-purpose statistical software package developed by StataCorp for data manipulation, visualization, statistics, and automated reporting. It is used by researchers in many fie ...
includes two, Python includes two, and
Microsoft Excel Microsoft Excel is a spreadsheet developed by Microsoft for Microsoft Windows, Windows, macOS, Android (operating system), Android and iOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a macro (comp ...
includes two. Mathematica and SciPy support arbitrary parameters for methods which allow for other, non-standard, methods. The estimate types and interpolation schemes used include: Notes: *R‑1 through R‑3 are piecewise constant, with discontinuities. *R‑4 and following are piecewise linear, without discontinuities, but differ in how is computed. *R‑3 and R‑4 are not symmetric in that they do not give when . *Excel's PERCENTILE.EXC and Python's default "exclusive" method are equivalent to R‑6. *Excel's PERCENTILE and PERCENTILE.INC and Python's optional "inclusive" method are equivalent to R‑7. This is R's default method. *Packages differ in how they estimate quantiles beyond the lowest and highest values in the sample, i.e. and . Choices include returning an error value, computing linear extrapolation, or assuming a constant value. Of the techniques, Hyndman and Fan recommend R-8, but most statistical software packages have chosen R-6 or R-7 as the default. The
standard error The standard error (SE) of a statistic (usually an estimate of a parameter) is the standard deviation of its sampling distribution or an estimate of that standard deviation. If the statistic is the sample mean, it is called the standard error o ...
of a quantile estimate can in general be estimated via the bootstrap. The Maritz–Jarrett method can also be used.


Approximate quantiles from a stream

Computing approximate quantiles from data arriving from a stream can be done efficiently using compressed data structures. The most popular methods are t-digest and KLL. These methods read a stream of values in a continuous fashion and can, at any time, be queried about the approximate value of a specified quantile. Both algorithms are based on a similar idea: compressing the stream of values by summarizing identical or similar values with a weight. If the stream is made of a repetition of 100 times v1 and 100 times v2, there is no reason to keep a sorted list of 200 elements, it is enough to keep two elements and two counts to be able to recover the quantiles. With more values, these algorithms maintain a trade-off between the number of unique values stored and the precision of the resulting quantiles. Some values may be discarded from the stream and contribute to the weight of a nearby value without changing the quantile results too much. The t-digest maintains a data structure of bounded size using an approach motivated by k-means clustering to group similar values. The KLL algorithm uses a more sophisticated "compactor" method that leads to better control of the error bounds at the cost of requiring an unbounded size if errors must be bounded relative to . Both methods belong to the family of ''data sketches'' that are subsets of
Streaming Algorithms In computer science, streaming algorithms are algorithms for processing data streams in which the input is presented as a sequence of items and can be examined in only a few passes (typically just one). In most models, these algorithms have acces ...
with useful properties: t-digest or KLL sketches can be combined. Computing the sketch for a very large vector of values can be split into trivially parallel processes where sketches are computed for partitions of the vector in parallel and merged later.


Discussion

Standardized test results are commonly reported as a student scoring "in the 80th percentile", for example. This uses an alternative meaning of the word percentile as the ''interval'' between (in this case) the 80th and the 81st scalar percentile. This separate meaning of percentile is also used in peer-reviewed scientific research articles. The meaning used can be derived from its context. If a distribution is symmetric, then the median is the mean (so long as the latter exists). But, in general, the median and the mean can differ. For instance, with a random variable that has an
exponential distribution In probability theory and statistics, the exponential distribution is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average ...
, 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. Quantiles are useful measures because they are less susceptible than means to long-tailed distributions and outliers. Empirically, if the data being analyzed are not actually distributed according to an assumed distribution, or if there are 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
least absolute deviations Least absolute deviations (LAD), also known as least absolute errors (LAE), least absolute residuals (LAR), or least absolute values (LAV), is a statistical optimality criterion and a statistical optimization technique based minimizing the '' sum ...
, a method of regression that is more robust to outliers than is least squares, 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.
Least absolute deviations Least absolute deviations (LAD), also known as least absolute errors (LAE), least absolute residuals (LAR), or least absolute values (LAV), is a statistical optimality criterion and a statistical optimization technique based minimizing the '' sum ...
shares the ability to be relatively insensitive to large deviations in outlying observations, although even better methods of
robust regression In robust statistics, robust regression seeks to overcome some limitations of traditional regression analysis. A regression analysis models the relationship between one or more independent variables and a dependent variable. Standard types of regr ...
are available. The quantiles of a random variable are preserved under increasing transformations, in the sense that, for example, if is the median of a random variable , then is the median of , unless an arbitrary choice has been made from a range of values to specify a particular quantile. (See quantile estimation, above, for examples of such interpolation.) Quantiles can also be used in cases where only ordinal data are available.


See also

* Flashsort – sort by first bucketing by quantile *
Interquartile range In descriptive statistics, the interquartile range (IQR) is a measure of statistical dispersion, which is the spread of the data. The IQR may also be called the midspread, middle 50%, fourth spread, or H‑spread. It is defined as the differen ...
*
Descriptive statistics A descriptive statistic (in the count noun sense) is a summary statistic that quantitatively describes or summarizes features from a collection of information, while descriptive statistics (in the mass noun sense) is the process of using and an ...
*
Quartile In statistics, a quartile is a type of quantile which divides the number of data points into four parts, or ''quarters'', of more-or-less equal size. The data must be ordered from smallest to largest to compute quartiles; as such, quartiles are a ...
*
Q–Q plot In statistics, a Q–Q plot (quantile-quantile plot) is a probability plot, a graphical method for comparing two probability distributions by plotting their ''quantiles'' against each other. A point on the plot corresponds to one of the qu ...
*
Quantile function In probability and statistics, the quantile function, associated with a probability distribution of a random variable, specifies the value of the random variable such that the probability of the variable being less than or equal to that value equ ...
*
Quantile normalization In statistics, quantile normalization is a technique for making two distributions identical in statistical properties. To quantile-normalize a test distribution to a reference distribution of the same length, sort the test distribution and sort t ...
*
Quantile regression Quantile regression is a type of regression analysis used in statistics and econometrics. Whereas the method of least squares estimates the conditional ''mean'' of the response variable across values of the predictor variables, quantile regress ...
* Quantization *
Summary statistics In descriptive statistics, summary statistics are used to summarize a set of observations, in order to communicate the largest amount of information as simply as possible. Statisticians commonly try to describe the observations in * a measure of ...
* Tolerance interval ("
confidence intervals In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for the ''p''th quantile")


References


Further reading

*


External links

* {{Commons category-inline, Quantiles Summary statistics