Quantile
Encyclopedia : Q : QU : QUA : Quantile
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 q-quantile is the value x such that the probability that a random variable will be less than x is at most k/q and the probability that a random variable will be less than or equal to x is at least k/q. There are q − 1 quantiles, with k an integer satisfying 0 < k < q.
Some quantiles have special names:
- The 100-quantiles are called percentiles.
- The 10-quantiles are called deciles.
- The 5-quantiles are call quintiles.
- The 4-quantiles are called quartiles.
More formally: the kth "q"-quantile of the population parameter X can be defined as the value "x" such that:
- [P(X\le x)\ge p\mboxP(X\ge x)\ge 1-p] where [p=\frac]
- [P(X< x)\le p\mboxP(X> x)\le 1-p] where [p=\frac]
- [P(X\leq x)\geq p \ \mathrm \ P(X\geq x)\geq 1-p]
- [P(X< x)\le p \ \mathrm \ P(X> x)\le 1-p.]
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.
It should be noted that different software packages use slightly varying algorithms, so the answer they produce may be slightly different for any given set of data. Besides the algorithm given above, which is the proper one based on probability, there are at least four other algorithms commonly used (for various reasons, such as of ease of computation, ignorance, etc.).
If a distribution is symmetrical, then the median is the mean (so long as the latter exists). But in general, the median and the mean 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 to long tailed distributions and outliers.
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 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 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.
Estimating the quantiles
There are several methods for estimating the quantiles:
Let N be the number of non-missing values of the sample population, and let [x_1,x_2,\ldots,x_N] represent the ordered values of the sample population such that [x_1] is the smallest value, etc. For the kth q-quantile, let [p = k/q].
- Empirical distribution function
- [\beginx_j, & g=0\\ x_, & g>0\end]
- Empirical distribution function with averaging
- [\begin\frac(x_j+x_), & g=0\\ x_, & g>0\end]
- Weighted average
- [x_+g\cdot(x_-x_)]
- Sample number closest to (N-1)·p+1
- [\beginx_j, & g<.5\\ x_, & g\ge .5\end]
See also
External links
- Calculating quantiles using R programming language: [link], [link]
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
