Quark: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>XLinkBot
BOT--Reverting link addition(s) by 71.33.16.167 to revision 593349400 (https://www.youtube.com/watch?v=U0kXkWXSXRA [\byoutube\.com])
en>DVdm
Undid revision 597559688 by 86.161.166.216 (talk) Article says 1964
Line 1: Line 1:
'''Quantiles''' are points taken at regular intervals from the [[cumulative distribution function]] (CDF) of a [[random variable]]. Dividing ordered data into <math>q</math> essentially equal-sized data subsets is the motivation for <math>q</math>-quantiles; the quantiles are the data values marking the boundaries between consecutive subsets. Put another way, the <math>k^\mathrm{th}</math> <math>q</math>-quantile for a random variable is the value <math>x</math> such that the probability that the random variable will be less than <math>x</math> is at most <math>k/q</math> and the probability that the random variable will be more than <math>x</math> is at least <math>(q-k)/q=1-(k/q)</math>. There are <math>q-1</math> of the <math>q</math>-quantiles, one for each integer <math>k</math> satisfying <math>0 < k < q</math>.
== So the problem there ==


== Specialized quantiles ==
Forward, impatient authentic with: 'got got, do not hypocritical.'<br><br>'This time it really was not a fake ...... Oh, you old men is really a genius ah, I [http://www.dmwai.com/webalizer/kate-spade-6.html ケイトスペード リボン バッグ] also worry that the trial no less than ten hours, ten minutes did not use the results got ...... you know how they want to buy a Several kidney son, dressed as gang trafficking in human organs, stunned is to lay the whole kid scared to say ...... [http://www.dmwai.com/webalizer/kate-spade-3.html 財布 kate spade] look to [http://www.dmwai.com/webalizer/kate-spade-8.html 財布 ケイトスペード] the tools of crime has been extracted, the combined store and later found the vehicle [http://www.dmwai.com/webalizer/kate-spade-14.html kate spade マザーズバッグ] broke [http://www.dmwai.com/webalizer/kate-spade-8.html ハンドバッグ ケイトスペード] down, basic, and we pre- The conjecture is consistent. 'Yang Wubin sat down, the case advancing rapidly, he threw himself relaxed, arrest for SWAT, it is nothing more difficult, is not to be scared of the catch anyone.<br><br>'Do not be wise after the event, people guess when you still laugh too.' Xu Pingqiu exposing old debts, but the captain did not care Yang, Fu Zhang Tao straight forward: 'At that time nobody knew the truth?'<br><br>hey, wrong, Young captain stunned, since I do not know, how could guess who.<br><br>So the problem there, Young
Some ''q''-quantiles have special names:{{Citation needed|date=February 2010}} <!-- citation for anyone who uses this terminology (regarding quantile part only) -->
相关的主题文章:
*The 2-quantile is called the [[median]]
  <ul>
*The 3-quantiles are called [[wikt:tertile|tertile]]s or [[wikt:tercile|tercile]]s → T
 
*The 4-quantiles are called [[quartile]]s → Q
  <li>[http://www52.tok2.com/home/asvii/cgi-bin/viibbs/aska.cgi http://www52.tok2.com/home/asvii/cgi-bin/viibbs/aska.cgi]</li>
*The 5-quantiles are called [[wikt:quintile|quintile]]s → QU
 
*The 6-quantiles are called [[wikt:sextile|sextile]]s → S
  <li>[http://new.hzxmh.com/home.php?mod=space&uid=10776 http://new.hzxmh.com/home.php?mod=space&uid=10776]</li>
*The 10-quantiles are called [[decile]]s → D
 
*The 12-quantiles are called duo-deciles → Dd
  <li>[http://www.scriptsearch.com/cgi-bin/jump.cgi http://www.scriptsearch.com/cgi-bin/jump.cgi]</li>
*The 20-quantiles are called [[wikt:vigintile|vigintile]]s → V
 
*The 100-quantiles are called [[percentile]]s → P
  </ul>
*The 1000-quantiles are called [[permille]]s → Pr
 
More generally, one can consider the [[quantile function]] for any distribution. This is defined for real variables between zero and one and is mathematically the inverse of the cumulative distribution function.
 
== Quantiles of a population ==
For a population of discrete values, or for a continuous population density, the <math>k</math>th <math>q</math>-quantile is the data value where the cumulative distribution function crosses <math>k/q.</math>  That is, <math>x</math> is a <math>k</math>th <math>q</math>-quantile for a variable <math>X</math> if
: <math>\Pr[X < x] \le k/q</math> (or equivalently, <math>\Pr[X \ge x] \ge 1-k/q</math>)
and
: <math>\Pr[X \le x] \ge k/q</math> (or equivalently, <math>\Pr[X > x] \le 1-k/q</math>).
 
For a finite population of <math>N</math> values indexed 1,...,<math>N</math> from lowest to highest, the <math>k</math>th <math>q</math>-quantile of this population can be computed via the value of <math>I_p = N \frac{k}{q}</math>. If <math>I_p</math> is not an integer, then round up to the next integer to get the appropriate index; the corresponding data value is the <math>k</math>th <math>q</math>-quantile. On the other hand, if <math>I_p</math> 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 of a population|Estimating the quantiles]]).
 
If, instead of using integers <math>k</math> and <math>q</math>, the “<math>p</math>-quantile” is based on a [[real number]] <math>p</math> with <math>0<p<1</math>, then <math>p</math> replaces <math>k/q</math> in the above formulae.  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, rounding, see definition under [[percentile]]s.
 
=== Even-sized population ===
 
Consider an ordered population of 10 data values {3, 6, 7, 8, 8, 10, 13, 15, 16, 20}
 
* The rank of the first quartile is 10&times;(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.
* The rank of the second quartile (same as the median) is 10&times;(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&mdash;that is (8+10)/2 = 9, though any value from 8 through to 10 could be taken to be the median.
* The rank of the third quartile is 10&times;(3/4) = 7.5, which rounds up to 8. The eighth value in the population is 15.
 
=== Odd-sized population ===
 
Consider an ordered population of 11 data values {3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20}.
 
* The first quartile is determined by 11&times;(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.
* The second quartile value (same as the median) is determined by 11&times;(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.
* The third quartile value for the original example above is determined by 11&times;(3/4) = 8.25, which rounds up to 9. The ninth value in the population is 15.
 
== 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.
 
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 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 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]], 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 <math>m</math> is the median of a random variable <math>X</math>, then <math>2^m</math> is the median of <math>2^X</math>, unless an arbitrary choice has been made from a range of values to specify a particular quantile. (See quantile estimation, below, for examples of such interpolation.)  Quantiles can also be used in cases where only [[Ordinal scale|ordinal]] data are available.
 
==Estimating the quantiles of a population==
 
There are several methods for [[Estimation theory|estimating]] the quantiles.<ref>{{cite journal |author=Hyndman, R.J. |coauthors=Fan, Y. |title=Sample Quantiles in Statistical Packages |journal=American Statistician |date=November 1996 |volume=50 |issue=4 |pages=361–365 |doi=10.2307/2684934 |jstor=2684934 |publisher=American Statistical Association }}</ref> The most comprehensive breadth of methods is available in the [[R (programming language)|R]] and [[GNU Octave]] programming languages, which include nine sample quantile methods.<ref>{{cite manual |author=Frohne, I.; Hyndman, R.J. |title=Sample Quantiles |publisher=R Project |url=http://stat.ethz.ch/R-manual/R-devel/library/stats/html/quantile.html |id=ISBN 3-900051-07-0 |year=2009}}</ref><ref name="Function Reference: quantile - Octave-Forge - SourceForge">{{cite web |title=Function Reference: quantile - Octave-Forge - SourceForge |url=http://octave.sourceforge.net/octave/function/quantile.html|accessdate=6 September 2013}}</ref> [[SAS (software)|SAS]] includes five sample quantile methods, [[SciPy]] includes [http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.mstats.mquantiles.html eight], [[STATA]] includes two, and [[Microsoft Excel]] includes one.
 
In effect, the methods compute ''Q''<sub>''p''</sub>, the estimate for the ''k''th ''q''-quantile, where ''p''&nbsp;=&nbsp;''k''&nbsp;/&nbsp;''q'', from a sample of size ''N'' by computing a real valued index ''h''.  When ''h'' is an integer, the ''h''th smallest of the ''N'' values, ''x''<sub>''h''</sub>, is the quantile estimate. Otherwise a rounding or interpolation scheme is used to compute the quantile estimate from ''h'', ''x''<sub>⌊''h''⌋</sub>, and ''x''<sub>⌈''h''⌉</sub>.  (For notation, see [[floor and ceiling functions]]).
 
Estimate types include:
 
{| class="wikitable"
|-
! Type
! ''h''
! ''Q''<sub>''p''</sub>
! Notes
|-
| R-1, SAS-3
| <math>Np + 1/2\,</math>
| <math>x_{\lceil h\,-\,1/2 \rceil}</math>
| Inverse of [[empirical distribution function]]. When ''p''&nbsp;=&nbsp;0, use ''x''<sub>1</sub>.
|-
| R-2, SAS-5
| <math>Np + 1/2\,</math>
| <math>\frac{x_{\lceil h\,-\,1/2 \rceil} + x_{\lfloor h\,+\,1/2 \rfloor}}{2}</math>
| The same as R-1, but with averaging at discontinuities.  When ''p''&nbsp;=&nbsp;0, ''x''<sub>1</sub>. When ''p''&nbsp;=&nbsp;1, use ''x''<sub>''N''</sub>.
|-
| R-3, SAS-2
| <math>Np\,</math>
| <math>x_{\lfloor h \rceil}\,</math>
| The observation numbered closest to ''Np''. Here, ⌊&nbsp;h&nbsp;⌉ indicates rounding to the nearest integer, choosing the even integer in the case of a tie. When {{nowrap|''p'' &le; (1/2) / ''N''}}, use ''x''<sub>1</sub>.
|-
| R-4, SAS-1, SciPy-(0,1)
| <math>Np\,</math>
| <math>x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) (x_{\lfloor h \rfloor + 1} - x_{\lfloor h \rfloor})</math>
| Linear interpolation of the empirical distribution function. When {{nowrap|''p'' < 1 / ''N''}}, use ''x''<sub>1</sub>. When ''p''&nbsp;=&nbsp;1, use ''x''<sub>''N''</sub>.
|-
| R-5, SciPy-(.5,.5)
| <math>Np + 1/2\,</math>
| <math>x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) (x_{\lfloor h \rfloor + 1} - x_{\lfloor h \rfloor})</math>
| Piecewise linear function where the knots are the values midway through the steps of the empirical distribution function.  When {{nowrap|''p'' < (1/2) / ''N''}}, use ''x''<sub>1</sub>. When {{nowrap|''p'' &ge; (''N'' - 1/2) / ''N''}}, use ''x''<sub>''N''</sub>.
|-
| R-6, SAS-4, SciPy-(0,0)
| <math>(N+1)p\,</math>
| <math>x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) (x_{\lfloor h \rfloor + 1} - x_{\lfloor h \rfloor})</math>
| Linear interpolation of the expectations for the order statistics for the uniform distribution on [0,1]. When {{nowrap|''p'' < 1 / (''N''+1)}}, use ''x''<sub>1</sub>. When {{nowrap|''p'' &ge; ''N'' / (''N'' + 1)}}, use ''x''<sub>''N''</sub>.
|-
| R-7, Excel, SciPy-(1,1)
| <math>(N-1)p + 1\,</math>
| <math>x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) (x_{\lfloor h \rfloor + 1} - x_{\lfloor h \rfloor})</math>
| Linear interpolation of the modes for the order statistics for the uniform distribution on [0,1]. When ''p''&nbsp;=&nbsp;1, use ''x''<sub>''N''</sub>.
|-
| R-8, SciPy-(1/3,1/3)
| <math>(N + 1/3)p + 1/3\,</math>
| <math>x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) (x_{\lfloor h \rfloor + 1} - x_{\lfloor h \rfloor})</math>
| Linear interpolation of the approximate medians for order statistics. When {{nowrap|''p'' < (2/3) / (''N'' + 1/3)}}, use ''x''<sub>1</sub>. When {{nowrap|''p'' &ge; (''N'' - 1/3) / (''N'' + 1/3)}}, use ''x''<sub>''N''</sub>.
|-
| R-9, SciPy-(3/8,3/8)
| <math>(N + 1/4)p + 3/8\,</math>
| <math>x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) (x_{\lfloor h \rfloor + 1} - x_{\lfloor h \rfloor})</math>
| The resulting quantile estimates are approximately unbiased for the expected order statistics if x is normally distributed. When {{nowrap|''p'' < (5/8) / (''N'' + 1/4)}}, use ''x''<sub>1</sub>. When {{nowrap|''p'' &ge; (''N'' - 3/8) / (''N'' + 1/4)}}, use ''x''<sub>''N''</sub>.
|-
|
| <math>(N + 2)p - 1/2\,</math>
| <math>x_{\lfloor h \rfloor} + (h - \lfloor h \rfloor) (x_{\lfloor h \rfloor + 1} - x_{\lfloor h \rfloor})</math>
| If ''h'' were rounded, this would give the order statistic with the least expected square deviation relative to ''p''. When {{nowrap|''p'' < (3/2) / (''N'' + 2)}}, use ''x''<sub>1</sub>.  When {{nowrap|''p'' &ge; (''N'' + 1/2) / (''N'' + 2)}}, use ''x''<sub>''N''</sub>.
|}
 
Note that R-3 and R-4 do not give ''h''&nbsp;=&nbsp;(''N''&nbsp;+&nbsp;1)&nbsp;/&nbsp;2 when ''p''&nbsp;=&nbsp;1/2.
 
The [[standard error (statistics)|standard error]] of a quantile estimate can in general be estimated via the [[bootstrap (statistics)|bootstrap]]. The Maritz-Jarrett method can also be used.<ref>Rand R. Wilcox.  Introduction to robust estimation and hypothesis testing.  ISBN 0-12-751542-9</ref>
 
==See also==
* [[Flashsort]] – sort by first bucketing by quantile
* [[Descriptive statistics]]
* [[Quartile]]
* [[Q-Q plot]]
* [[Quantile function]]
* [[Quantile normalization]]
* [[Quantile regression]]
* [[Summary statistics]]
 
==References==
{{Reflist}}
 
== Further Reading ==
 
{{commonscat|Quantiles|Quantiles}}
* R.J. Serfling. ''Approximation Theorems of Mathematical Statistics''. John Wiley & Sons, 1980.
[[Category:Summary statistics]]

Revision as of 21:23, 28 February 2014

So the problem there

Forward, impatient authentic with: 'got got, do not hypocritical.'

'This time it really was not a fake ...... Oh, you old men is really a genius ah, I ケイトスペード リボン バッグ also worry that the trial no less than ten hours, ten minutes did not use the results got ...... you know how they want to buy a Several kidney son, dressed as gang trafficking in human organs, stunned is to lay the whole kid scared to say ...... 財布 kate spade look to 財布 ケイトスペード the tools of crime has been extracted, the combined store and later found the vehicle kate spade マザーズバッグ broke ハンドバッグ ケイトスペード down, basic, and we pre- The conjecture is consistent. 'Yang Wubin sat down, the case advancing rapidly, he threw himself relaxed, arrest for SWAT, it is nothing more difficult, is not to be scared of the catch anyone.

'Do not be wise after the event, people guess when you still laugh too.' Xu Pingqiu exposing old debts, but the captain did not care Yang, Fu Zhang Tao straight forward: 'At that time nobody knew the truth?'

hey, wrong, Young captain stunned, since I do not know, how could guess who.

So the problem there, Young 相关的主题文章: