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 than the number of groups created. Thus quartiles are the three cut points that will divide a dataset into four equalsized groups. Common quantiles have special names: for instance quartile, decile (creating 10 groups: see below for more). 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.
qquantiles are values that partition a finite set of values into q subsets of (nearly) equal sizes. There are q − 1 of the qquantiles, one for each integer k satisfying 0 < k < q. In some cases the value of a quantile may not be uniquely determined, as can be the case for the median (2quantile) of a uniform probability distribution on a set of even size. Quantiles can also be applied to continuous distributions, providing a way to generalize rank statistics to continuous variables. When the cumulative distribution function of a random variable is known, the qquantiles are the application of the quantile function (the inverse function of the cumulative distribution function) to the values {1/q, 2/q, …, (q − 1)/q}.
YouTube Encyclopedic

1/5Views:32 33126 83159 023408 45622 400

✪ StatQuest: Quantiles and Percentiles, Clearly Explained!!!

✪ Quantiles and Percentiles

✪ StatQuest: QuantileQuantile Plots (QQ plots), Clearly Explained

✪ Percentiles and Quartiles

✪ Quartile, Quantile und wie man sie berechnet, Beispiel 1  W.11.06
Transcription
Contents
Specialized quantiles
Some qquantiles have special names:^{[citation needed]}
 The only 2quantile is called the median
 The 3quantiles are called tertiles or terciles → T
 The 4quantiles are called quartiles → Q; the difference between upper and lower quartiles is also called the interquartile range, midspread or middle fifty → IQR = Q_{3} − Q_{1}
 The 5quantiles are called quintiles → QU
 The 6quantiles are called sextiles → S
 The 7quantiles are called septiles
 The 8quantiles are called octiles
 The 10quantiles are called deciles → D
 The 12quantiles are called duodeciles or dodeciles
 The 16quantiles are called hexadeciles → H
 The 20quantiles are called ventiles, vigintiles, or demideciles → V
 The 100quantiles are called percentiles → P
 The 1000quantiles have been called permilles or milliles, but these are rare and largely obsolete^{[1]}
Quantiles of a population
As in the computation of, for example, standard deviation, the estimation of a quantile depends upon whether one is operating with a statistical population or with a sample drawn from it. For a population, of discrete values or for a continuous population density, the kth qquantile is the data value where the cumulative distribution function crosses k/q. That is, x is a kth qquantile for a variable X if
 Pr[X < x] ≤ k/q or, equivalently, Pr[X ≥ x] ≥ 1 − k/q
and
 Pr[X ≤ x] ≥ k/q or, equivalently, Pr[X > x] ≤ 1 − k/q.
For a finite population of N equally probable values indexed 1, …, N from lowest to highest, the kth qquantile of this population can equivalently be computed via the value of I_{p} = N k/q. If I_{p} is not an integer, then round up to the next integer to get the appropriate index; the corresponding data value is the kth qquantile. On the other hand, if I_{p} is an integer then any number from the data value at that index to the data value of the next can be taken as the quantile, and it is conventional (though arbitrary) to take the average of those two values (see Estimating the quantiles).
If, instead of using integers k and q, the “pquantile” is based on a real number p with 0 < p < 1 then p replaces k/q in the above formulas. Some software programs (including Microsoft Excel) regard the minimum and maximum as the 0th and 100th percentile, respectively; however, such 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 percentiles.
Evensized population
Consider an ordered population of 10 data values {3, 6, 7, 8, 8, 10, 13, 15, 16, 20}. What are the 4quantiles (the "quartiles") of this dataset?
Quartile  Calculation  Result 

Zeroth quartile  Although not universally accepted, one can also speak of the zeroth quartile. This is the minimum value of the set, so the zeroth quartile in this example would be 3.  3 
First quartile  The rank of the first quartile is 10×(1/4) = 2.5, which rounds up to 3, meaning that 3 is the rank in the population (from least to greatest values) at which approximately 1/4 of the values are less than the value of the first quartile. The third value in the population is 7.  7 
Second quartile  The rank of the second quartile (same as the median) is 10×(2/4) = 5, which is an integer, while the number of values (10) is an even number, so the average of both the fifth and sixth values is taken—that is (8+10)/2 = 9, though any value from 8 through to 10 could be taken to be the median.  9 
Third quartile  The rank of the third quartile is 10×(3/4) = 7.5, which rounds up to 8. The eighth value in the population is 15.  15 
Fourth quartile  Although not universally accepted, one can also speak of the fourth quartile. This is the maximum value of the set, so the fourth quartile in this example would be 20. Under the Nearest Rank definition of quantile, the rank of the fourth quartile is the rank of the biggest number, so the rank of the fourth quartile would be 10.  20 
So the first, second and third 4quantiles (the "quartiles") of the dataset {3, 6, 7, 8, 8, 10, 13, 15, 16, 20} are {7, 9, 15}. If also required, the zeroth quartile is 3 and the fourth quartile is 20.
Oddsized population
Consider an ordered population of 11 data values {3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20}. What are the 4quantiles (the "quartiles") of this dataset?
Quartile  Calculation  Result 

Zeroth quartile  Although not universally accepted, one can also speak of the zeroth quartile. This is the minimum value of the set, so the zeroth quartile in this example would be 3.  3 
First quartile  The first quartile is determined by 11×(1/4) = 2.75, which rounds up to 3, meaning that 3 is the rank in the population (from least to greatest values) at which approximately 1/4 of the values are less than the value of the first quartile. The third value in the population is 7.  7 
Second quartile  The second quartile value (same as the median) is determined by 11×(2/4) = 5.5, which rounds up to 6. Therefore, 6 is the rank in the population (from least to greatest values) at which approximately 2/4 of the values are less than the value of the second quartile (or median). The sixth value in the population is 9.  9 
Third quartile  The third quartile value for the original example above is determined by 11×(3/4) = 8.25, which rounds up to 9. The ninth value in the population is 15.  15 
Fourth quartile  Although not universally accepted, one can also speak of the fourth quartile. This is the maximum value of the set, so the fourth quartile in this example would be 20. Under the Nearest Rank definition of quantile, the rank of the fourth quartile is the rank of the biggest number, so the rank of the fourth quartile would be 11.  20 
So the first, second and third 4quantiles (the "quartiles") of the dataset {3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20} are {7, 9, 15}. If also required, the zeroth quartile is 3 and the fourth quartile is 20.
Estimating quantiles from a sample
When one has a sample drawn from an unknown population, the cumulative distribution function and quantile function of the underlying population are not known and the task becomes that of estimating the quantiles. There are several methods.^{[2]} Mathematica,^{[3]} Matlab,^{[4]} R^{[5]} and GNU Octave^{[6]} programming languages include nine sample quantile methods. SAS includes five sample quantile methods, SciPy^{[7]} and Maple^{[8]} both include eight, EViews^{[9]} includes the six piecewise linear functions, Stata^{[10]} includes two, and Microsoft Excel includes two. Mathematica supports an arbitrary parameter for methods that allows for other, nonstandard, methods.
In effect, the methods compute Q_{p}, the estimate for the kth qquantile, where p = k/q, from a sample of size N by computing a real valued index h. When h is an integer, the hth smallest of the N values, x_{h}, is the quantile estimate. Otherwise a rounding or interpolation scheme is used to compute the quantile estimate from h, x_{⌊h⌋}, and x_{⌈h⌉}. (For notation, see floor and ceiling functions).
The estimate types and interpolation schemes used include:
Type  h  Q_{p}  Notes 

R1, SAS3, Maple1  Np + 1/2  x_{⌈h – 1/2⌉}  Inverse of empirical distribution function. 
R2, SAS5, Maple2, Stata  Np + 1/2  (x_{⌈h – 1/2⌉} + x_{⌊h + 1/2⌋}) / 2  The same as R1, but with averaging at discontinuities. 
R3, SAS2  Np  x_{⌊h⌉}  The observation numbered closest to Np. Here, ⌊h⌉ indicates rounding to the nearest integer, choosing the even integer in the case of a tie. 
R4, SAS1, SciPy(0,1), Maple3  Np  x_{⌊h⌋} + (h − ⌊h⌋) (x_{⌊h⌋ + 1} − x_{⌊h⌋})  Linear interpolation of the empirical distribution function. 
R5, SciPy(.5,.5), Maple4  Np + 1/2  x_{⌊h⌋} + (h − ⌊h⌋) (x_{⌊h⌋ + 1} − x_{⌊h⌋})  Piecewise linear function where the knots are the values midway through the steps of the empirical distribution function. 
R6, Excel, SAS4, SciPy(0,0), Maple5, Stataaltdef  (N + 1)p  x_{⌊h⌋} + (h − ⌊h⌋) (x_{⌊h⌋ + 1} − x_{⌊h⌋})  Linear interpolation of the expectations for the order statistics for the uniform distribution on [0,1]. That is, it is the linear interpolation between points (p_{h}, x_{h}), where p_{h} = h/(N+1) is the probability that the last of (N+1) randomly drawn values will not exceed the hth smallest of the first N randomly drawn values. 
R7, Excel, SciPy(1,1), Maple6, NumPy, Julia  (N − 1)p + 1  x_{⌊h⌋} + (h − ⌊h⌋) (x_{⌊h⌋ + 1} − x_{⌊h⌋})  Linear interpolation of the modes for the order statistics for the uniform distribution on [0,1]. 
R8, SciPy(1/3,1/3), Maple7  (N + 1/3)p + 1/3  x_{⌊h⌋} + (h − ⌊h⌋) (x_{⌊h⌋ + 1} − x_{⌊h⌋})  Linear interpolation of the approximate medians for order statistics. 
R9, SciPy(3/8,3/8), Maple8  (N + 1/4)p + 3/8  x_{⌊h⌋} + (h − ⌊h⌋) (x_{⌊h⌋ + 1} − x_{⌊h⌋})  The resulting quantile estimates are approximately unbiased for the expected order statistics if x is normally distributed. 
Notes:
 R1 through R3 are piecewise constant, with discontinuities.
 R4 and following are piecewise linear, without discontinuities, but differ in how h is computed.
 R3 and R4 are not symmetric in that they do not give h = (N + 1) / 2 when p = 1/2.
 Excel PERCENTILE.EXC is equivalent to R6
 Excel PERCENTILE and PERCENTILE.INC are equivalent to R7
 Packages differ in how they estimate quantiles beyond the lowest and highest values in the sample. Choices include returning an error value, computing linear extrapolation, or assuming a constant value.
The standard error of a quantile estimate can in general be estimated via the bootstrap. The Maritz–Jarrett method can also be used.^{[11]}
Discussion
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. Perhaps by this example it is meant that the student scores between the 80th and 81st percentiles, or "in" the group of students whose score placed them at the 80th percentile.
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, 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 longtailed 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 momentrelated statistics.
Closely related is the subject of least absolute deviations, 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 shares the ability to be relatively insensitive to large deviations in outlying observations, although even better methods of robust regression are available.
The quantiles of a random variable are preserved under increasing transformations, in the sense that, for example, if m is the median of a random variable X, then 2^{m} is the median of 2^{X}, 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
 Descriptive statistics
 Quartile
 Q–Q plot
 Quantile function
 Quantile normalization
 Quantile regression
 Quantization
 Summary statistics
 Tolerance interval ("confidence intervals for the pth quantile"^{[12]})
References
 ^ Helen Mary Walker, Joseph Lev, Elementary Statistical Methods, 1969, [p. 60 https://books.google.com/books?id=ogYnAQAAIAAJ&dq=permille]
 ^ Hyndman, R.J.; Fan, Y. (November 1996). "Sample Quantiles in Statistical Packages". American Statistician. American Statistical Association. 50 (4): 361–365. doi:10.2307/2684934. JSTOR 2684934.
 ^ Mathematica Documentation See 'Details' section
 ^ MATLAB implementation of the various estimation methods
 ^ Frohne, I.; Hyndman, R.J. (2009). Sample Quantiles. R Project. ISBN 3900051070.
 ^ "Function Reference: quantile  OctaveForge  SourceForge". Retrieved 6 September 2013.
 ^ http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.mstats.mquantiles.html
 ^ http://www.maplesoft.com/support/help/maple/view.aspx?path=Statistics%2FQuantile
 ^ "Archived copy". Archived from the original on April 16, 2016. Retrieved April 4, 2016. Cite uses deprecated parameter
deadurl=
(help)CS1 maint: archived copy as title (link)  ^ Stata documentation for the pctile and xtile commands See 'Methods and formulas' section.
 ^ Wilcox, Rand R. (2010). Introduction to Robust Estimation and Hypothesis Testing. ISBN 0127515429.
 ^ Stephen B. Vardeman (1992). "What about the Other Intervals?". The American Statistician. 46 (3): 193–197. doi:10.2307/2685212. JSTOR 2685212.
Further reading
 Serfling, R. J. (1980). Approximation Theorems of Mathematical Statistics. John Wiley & Sons. ISBN 0471024031.