In statistics, a k-th percentile, also known as percentile score or centile, is a score a given percentage k of scores in its frequency distribution falls ("exclusive" definition) or a score a given percentage falls ("inclusive" definition). Percentiles are expressed in the same unit of measurement as the input scores, in percent; for example, if the scores refer to human weight, the corresponding percentiles will be expressed in kilograms or pounds.In the limit of an infinite sample size, the percentile approximates the percentile function, the inverse of the cumulative distribution function.
Percentiles are a type of quantiles, obtained adopting a subdivision into 100 groups.The 25th percentile is also known as the first quartile (Q1), the 50th percentile as the median or second quartile (Q2), and the 75th percentile as the third quartile (Q3).For example, the 50th percentile (median) is the score (or, depending on the definition) which 50% of the scores in the distribution are found.
A related quantity is the percentile rank of a score, expressed in percent, which represents the fraction of scores in its distribution that are less than it, an exclusive definition.Percentile scores and percentile ranks are often used in the reporting of test scores from norm-referenced tests, but, as just noted, they are not the same. For percentile ranks, a score is given and a percentage is computed. Percentile ranks are exclusive: if the percentile rank for a specified score is 90%, then 90% of the scores were lower. In contrast, for percentiles a percentage is given and a corresponding score is determined, which can be either exclusive or inclusive. The score for a specified percentage (e.g., 90th) indicates a score below which (exclusive definition) or at or below which (inclusive definition) other scores in the distribution fall.
There is no standard definition of percentile;[1] [2] [3] however, all definitions yield similar results when the number of observations is very large and the probability distribution is continuous.[4] In the limit, as the sample size approaches infinity, the 100pth percentile (0<p<1) approximates the inverse of the cumulative distribution function (CDF) thus formed, evaluated at p, as p approximates the CDF. This can be seen as a consequence of the Glivenko–Cantelli theorem. Some methods for calculating the percentiles are given below.
The methods given in the calculation methods section (below) are approximations for use in small-sample statistics. In general terms, for very large populations following a normal distribution, percentiles may often be represented by reference to a normal curve plot. The normal distribution is plotted along an axis scaled to standard deviations, or sigma (
\sigma
Percentiles represent the area under the normal curve, increasing from left to right. Each standard deviation represents a fixed percentile. Thus, rounding to two decimal places, −3σ is the 0.13th percentile, −2σ the 2.28th percentile, −1σ the 15.87th percentile, 0σ the 50th percentile (both the mean and median of the distribution), +1σ the 84.13th percentile, +2σ the 97.72nd percentile, and +3σ the 99.87th percentile. This is related to the 68–95–99.7 rule or the three-sigma rule. Note that in theory the 0th percentile falls at negative infinity and the 100th percentile at positive infinity, although in many practical applications, such as test results, natural lower and/or upper limits are enforced.
When ISPs bill "burstable" internet bandwidth, the 95th or 98th percentile usually cuts off the top 5% or 2% of bandwidth peaks in each month, and then bills at the nearest rate. In this way, infrequent peaks are ignored, and the customer is charged in a fairer way. The reason this statistic is so useful in measuring data throughput is that it gives a very accurate picture of the cost of the bandwidth. The 95th percentile says that 95% of the time, the usage is below this amount: so, the remaining 5% of the time, the usage is above that amount.
Physicians will often use infant and children's weight and height to assess their growth in comparison to national averages and percentiles which are found in growth charts.
The 85th percentile speed of traffic on a road is often used as a guideline in setting speed limits and assessing whether such a limit is too high or low.[5] [6]
In finance, value at risk is a standard measure to assess (in a model-dependent way) the quantity under which the value of the portfolio is not expected to sink within a given period of time and given a confidence value.
There are many formulas or algorithms[7] for a percentile score. Hyndman and Fan [1] identified nine and most statistical and spreadsheet software use one of the methods they describe. Algorithms either return the value of a score that exists in the set of scores (nearest-rank methods) or interpolate between existing scores and are either exclusive or inclusive.
PC: percentile specified | 0.10 | 0.25 | 0.50 | 0.75 | 0.90 | |
---|---|---|---|---|---|---|
N: Number of scores | 10 | 10 | 10 | 10 | 10 | |
OR: ordinal rank = PC × N | 1 | 2.5 | 5 | 7.5 | 9 | |
Rank: >OR / ≥OR | 2/1 | 3/3 | 6/5 | 8/8 | 10/9 | |
Score at rank (exc/inc) | 2/1 | 3/3 | 4/3 | 5/5 | 7/5 |
The figure shows a 10-score distribution, illustrates the percentile scores that result from these different algorithms, and serves as an introduction to the examples given subsequently. The simplest are nearest-rank methods that return a score from the distribution, although compared to interpolation methods, results can be a bit crude. The Nearest-Rank Methods table shows the computational steps for exclusive and inclusive methods.
PC: percentile specified | 0.10 | 0.25 | 0.50 | 0.75 | 0.90 | |
---|---|---|---|---|---|---|
N: number of scores | 10 | 10 | 10 | 10 | 10 | |
OR: PC×(N+1) / PC×(N−1)+1 | 1.1/1.9 | 2.75/3.25 | 5.5/5.5 | 8.25/7.75 | 9.9/9.1 | |
LoRank: OR truncated | 1/1 | 2/3 | 5/5 | 8/7 | 9/9 | |
HIRank: OR rounded up | 2/2 | 3/4 | 6/6 | 9/8 | 10/10 | |
LoScore: score at LoRank | 1/1 | 2/3 | 3/3 | 5/4 | 5/5 | |
HiScore: score at HiRank | 2/2 | 3/3 | 4/4 | 5/5 | 7/7 | |
Difference: HiScore − LoScore | 1/1 | 1/0 | 1/1 | 0/1 | 2/2 | |
Mod: fractional part of OR | 0.1/0.9 | 0.75/0.25 | 0.5/0.5 | 0.25/0.75 | 0.9/0.1 | |
Interpolated score (exc/inc) = LoScore + Mod × Difference | 1.1/1.9 | 2.75/3 | 3.5/3.5 | 5/4.75 | 6.8/5.2 |
Interpolation methods, as the name implies, can return a score that is between scores in the distribution. Algorithms used by statistical programs typically use interpolation methods, for example, the percentile.exc and percentile.inc functions in Microsoft Excel. The Interpolated Methods table shows the computational steps.
One definition of percentile, often given in texts, is that the P-th percentile
(0<P\le100)
n=\left\lceil
P | |
100 |
x N\right\rceil.
An alternative to rounding used in many applications is to use linear interpolation between adjacent ranks.
All of the following variants have the following in common. Given the order statistics
\{vi,i=1,2,\ldots,N:vi+1\gevi,\foralli=1,2,\ldots,N-1\},
(vi,i)
v(x)=v\lfloor+(x\bmod1)(v\lfloor-v\lfloor),\forallx\in[1,N]:v(i)=vi,fori=1,2,\ldots,N,
\lfloorx\rfloor
x\bmod1
x=N
v\lfloor
x\bmod1=0
There are two ways in which the variant approaches differ. The first is in the linear relationship between the rank, the percent rank
P=100p
x=f(p,N)=(N+c1)p+c2.
(1,N)
p=0.5
\begin{align}f(0.5,N)&=
N+c1 | |
2 |
+c | ||||
|
\ \therefore2c2+c1&=1\end{align},
x=f(p,N)=(N+1-2C)p+C.
[0,1]
f(p,N)
[1,N]
C=\tfrac{1}{2}(1+\xi)
(Sources: Matlab "prctile" function,[8] [9])
x=f(p)=\begin{cases} Np+ | 1 |
2 |
,\forallp\in\left[p1,pN\right],\\ 1,\forallp\in\left[0,p1\right],\\ N,\forallp\in\left[pN,1\right]. \end{cases}
p | \left(i- | ||||
|
1 | |
2 |
\right),i\in[1,N]\capN
\therefore
p | ||||
|
,
p | ||||
|
.
Pi=100pi.
p= | 1 | \left(x- |
N |
1 | |
2 |
\right),x\in(1,N)\capR.
[Source: Some software packages, including [[NumPy]][10] and Microsoft Excel (up to and including version 2013 by means of the PERCENTILE.INC function). Noted as an alternative by NIST.[11] ]
x=f(p,N)=p(N-1)+1,p\in[0,1]
\thereforep=
x-1 | |
N-1 |
,x\in[1,N].
x\leftrightarrowp
p\in[0,1]
(The primary variant recommended by NIST. Adopted by Microsoft Excel since 2010 by means of PERCENTIL.EXC function. However, as the "EXC" suffix indicates, the Excel version excludes both endpoints of the range of p, i.e.,
p\in(0,1)
1 | |
N+1 |
x=f(p,N)=\begin{cases} 1,p\in\left[0,
1 | |
N+1 |
\right]\\ p(N+1),p\in\left(
1 | , | |
N+1 |
N | |
N+1 |
\right)\\ N,p\in\left[
N | |
N+1 |
,1\right] \end{cases}.
p=
x | |
N+1 |
,x\in(0,N).
See also: Weighted median. In addition to the percentile function, there is also a weighted percentile, where the percentage in the total weight is counted instead of the total number. There is no standard function for a weighted percentile. One method extends the above approach in a natural way.
Suppose we have positive weights
w1,w2,w3,...,wN
SN=
N | |
\sum | |
k=1 |
wk,
pn=
1 | |
SN |
\left(Sn-
wn | |
2 |
\right)
C=1/2
pn=
Sn-Cwn | |
SN+(1-2C)wn |
C
v=vk+
P-pk | |
pk-pk |
(vk-vk).
The 50% weighted percentile is known as the weighted median.