Quantile

From Academic Kids

Quantiles are essentially points taken at regular vertical 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 pth q-quantile is the value x such that the probability that a random variable will be less than x is at most p/q and the probability that a random variable will be less than or equal to x is at least p/q. There are q − 1 q-quantiles, with p an integer satisfying 0 < p < 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 pth q-quantile is the data value where the cumulative distribution function is p/q. For a finite sample of N data points, calculate Np/q--if this is not an integer, then round up to the next integer to get the appropriate sample number (assuming samples ordered by increasing value); if it is an integer then any value from the value of that sample number to the value of the next can be taken as the quantile, and it is conventional (though arbitrary) to take the average of those two values.

More formally: the pth q-quantile of the distribution of a random variable X can be defined as the value(s) x such that:

<math>P(X\leq x)\geq \frac{p}{q} \ \mathrm{and} \ P(X\geq x)\geq \frac{q-p}{q}.<math>

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

<math>P(X\leq x)\geq p \ \mathrm{and} \ P(X\geq x)\geq 1-p.<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.

If a distribution is symmetrical, then the median is the mean, but this is not generally the case.

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.

Calculating the quantiles

There are several methods for calculating the quantiles:

Let n be the number of nonmissing values for a variable, and let <math>x_1,x_2,...,x_n<math> represent the ordered values of the variable such that <math>x_1<math> is the smallest value, etc. For the kth q-quantile between 0 and n, let <math>p = k/q<math>. Then define <math>j<math> as the integer part of <math>np<math> or <math>(n+1)p<math> and <math>g<math> as the fractional part.

  • Weighted average at <math>x_{np}<math> <math>y= x_j + g(x_{(j+1)} - x_j)<math> where <math>x_0<math> is taken to be <math>x_1.<math>
  • Weighted average at <math>x_{(n+1)p}<math> - generally used for a sample <math>y=x_j + g(x_{(j+1)} - x_j)<math> where <math>x_{n+1}<math> is taken to be <math>x_n.<math>
  • Empirical distribution function <math>y=x_j<math> if <math>g=0<math> and <math>y=x_{(j+1)}<math> if <math>g > 0.<math>
  • Empirical distribution function with averaging <math>y=\frac{1}{2}(x_j+x_{(j+1)})<math> if <math>g = 0<math> and <math>y=x_{(j+1)}<math> if <math>g > 0.<math>
  • Observation numbered closest to np.

In percentiles, q = 100; in quartiles, q = 4.

See also

fr:Quantile it:Quantile pl:Kwantyl

Navigation

Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools