Kalpana Kalpana (Editor)

Percentile

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

A percentile (or a centile) is a measure used in statistics indicating the value below which a given percentage of observations in a group of observations fall. For example, the 20th percentile is the value (or score) below which 20% of the observations may be found.

Contents

The term percentile and the related term percentile rank are often used in the reporting of scores from norm-referenced tests. For example, if a score is at the 86th percentile, where 86 is the percentile rank, it is equal to the value below which 86% of the observations may be found (carefully contrast with in the 86th percentile, which means the score is at or below the value of which 86% of the observations may be found - every score is in the 100th percentile). 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). In general, percentiles and quartiles are specific types of quantiles.

Applications

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. Just the same, 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.

The normal distribution and percentiles

The methods given in the Definitions section 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 units. Mathematically, the normal distribution extends to negative infinity on the left and positive infinity on the right. Note, however, that only a very small proportion of individuals in a population will fall outside the −3 to +3 range. For example, with human heights very few people are above the +3 sigma height level.

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.

Definitions

There is no standard definition of percentile, however all definitions yield similar results when the number of observations is very large. In the limit, as the sample size approaches infinity and the data points become so densely spaced they appear continuous, 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. Some methods for calculating the percentiles are given below.

The Nearest Rank method

One definition of percentile, often given in texts, is that the P-th percentile ( 0 < P 100 ) of a list of N ordered values (sorted from least to greatest) is the smallest value in the list such that no more than P percent of the data is strictly less than the value and at least P percent of the data is less than or equal to that value. This is obtained by first calculating the ordinal rank and then taking the value from the ordered list that corresponds to that rank. The ordinal rank n is calculated using this formula

n = P 100 × N

Note the following:

  • Using the Nearest Rank method on lists with fewer than 100 distinct values can result in the same value being used for more than one percentile.
  • A percentile calculated using the Nearest Rank method will always be a member of the original ordered list.
  • The 100th percentile is defined to be the largest value in the ordered list.
  • Worked examples of the Nearest Rank method

    Example 1:

    Consider the ordered list {15, 20, 35, 40, 50}, which contains five data values. What are the 5th, 30th, 40th, 50th and 100th percentiles of this list using the Nearest Rank method?

    So the 30th, 40th, 50th and 100th percentiles of the ordered list {15, 20, 35, 40, 50} using the Nearest Rank method are {20, 20, 35, 50}

    Example 2:

    Consider an ordered population of 10 data values {3, 6, 7, 8, 8, 10, 13, 15, 16, 20}. What are the 25th, 50th, 75th and 100th percentiles of this list using the Nearest Rank method?

    So the 25th, 50th, 75th and 100th percentiles of the ordered list {3, 6, 7, 8, 8, 10, 13, 15, 16, 20} using the Nearest Rank method are {7, 8, 15, 20}

    Example 3:

    Consider an ordered population of 11 data values {3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20}. What are the 25th, 50th, 75th and 100th percentiles of this list using the Nearest Rank method?

    So the 25th, 50th, 75th and 100th percentiles of the ordered list {3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20} using the Nearest Rank method are {7, 9, 15, 20}

    The Linear Interpolation Between Closest Ranks method

    An alternative to rounding used in many applications is to use linear interpolation between adjacent ranks.

    Commonalities between the Variants of this Method

    All of the following variants have the following in common. Given the order statistics

    { v i , i = 1 , 2 , . . . , N : v i + 1 v i , i = 1 , 2 , . . . N 1 } ,

    we seek a linear interpolation function that passes through the points ( v i , i ) . This is simply accomplished by

    v ( x ) = v x + ( x % 1 ) ( v x + 1 v x ) , x [ 1 , N ] : v ( i ) = v i , for  i = 1 , 2 , . . . , N ,

    where x uses the floor function to represent the integral part of positive x , whereas x % 1 uses the mod function to represent its fractional part (the remainder after division by 1). (Note that, though at the endpoint x = N , v x + 1 is undefined, it does not need to be because it is multiplied by x % 1 = 0 .) As we can see, x is the continuous version of the subscript i , linearly interpolating v between adjacent nodes.

    There are two ways in which the variant approaches differ. The first is in the linear relationship between the rank x , the percent rank P = 100 p , and a constant that is a function of the sample size N :

    x = f ( p , N ) = ( N + c 1 ) p + c 2 .

    There is the additional requirement that the midpoint of the range ( 1 , N ) , corresponding to the median, occur at p = 0.5 :

    f ( 0.5 , N ) = N + c 1 2 + c 2 = N + 1 2 2 c 2 + c 1 = 1 ,

    and our revised function now has just one degree of freedom, looking like this:

    x = f ( p , N ) = ( N + 1 2 C ) p + C .

    The second way in which the variants differ is in the definition of the function near the margins of the [ 0 , 1 ] range of p : f ( p , N ) should produce, or be forced to produce, a result in the range [ 1 , N ] , which may mean the absence of a one-to-one correspondence in the wider region.

    First Variant, C = 1 / 2 {displaystyle C=1/2}

    (Sources: Matlab "prctile" function,)

    x = f ( p ) = { N p + 1 2 , p [ p 1 , p N ] , 1 , p [ 0 , p 1 ] , N , p [ p N , 1 ] . ,

    where

    p i = 1 N ( i 1 2 ) , i [ 1 , N ] N p 1 = 1 2 N , p N = 2 N 1 2 N .

    Furthermore, let

    P i = 100 p i .

    The inverse relationship is restricted to a narrower region:

    p = 1 N ( x 1 2 ) , x ( 1 , N ) R .

    Worked Example of the First Variant

    Consider the ordered list {15, 20, 35, 40, 50}, which contains five data values. What are the 5th, 30th, 40th and 95th percentiles of this list using the Linear Interpolation Between Closest Ranks method? First, we calculate the percent rank for each list value.

    Then we take those percent ranks and calculate the percentile values as follows:

    So the 5th, 30th, 40th and 95th percentiles of the ordered list {15, 20, 35, 40, 50} using the Linear Interpolation Between Closest Ranks method are {15, 20, 27.5, 50}

    Second Variant, C = 1 {displaystyle C=1}

    (Source: Some software packages, including NumPy and Microsoft Excel (up to and including version 2013 by means of the PERCENTILE.INC function). Noted as an alternative by NIST)

    x = f ( p , N ) = p ( N 1 ) + 1 p [ 0 , 1 ] p = x 1 N 1 x [ 1 , N ] .

    Note that the x p relationship is one-to-one for p [ 0 , 1 ] , the only one of the three variants with this property; hence the "INC" suffix, for inclusive, on the Excel function.

    Worked Examples of the Second Variant

    Example 1:

    Consider the ordered list {15, 20, 35, 40, 50}, which contains five data values. What is the 40th percentile of this list using this variant method?

    First we calculate the rank of the 40th percentile:

    x = 40 100 ( 5 1 ) + 1 = 2.6

    So, x=2.6, which gives us x = 2 and x % 1 = 0.6 . So, the value of the 40th percentile is

    v ( 2.6 ) = v 2 + 0.6 ( v 3 v 2 ) = 20 + 0.6 ( 35 20 ) = 29.

    Example 2:

    Consider the ordered list {1,2,3,4} which CONTAINS four data values. What is the 75th percentile of this list using the Microsoft Excel method?

    First we calculate the rank of the 75th percentile as follows:

    x = 75 100 ( 4 1 ) + 1 = 3.25

    So, x=3.25, which gives us an integral part of 3 and a fractional part of 0.25. So, the value of the 75th percentile is

    v ( 3.25 ) = v 3 + 0.25 ( v 4 v 3 ) = 3 + 0.25 ( 4 3 ) = 3.25.

    Third Variant, C = 0 {displaystyle C=0}

    (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 ( 0 , 1 ) , whereas the "INC" version, the second variant, does not; in fact, any number smaller than 1/(N+1) is also excluded and would cause an error.)

    x = f ( p , N ) = { 1 p [ 0 , 1 N + 1 ] p ( N + 1 ) p ( 1 N + 1 , N N + 1 ) N p [ N N + 1 , 1 ] .

    The inverse is restricted to a narrower region:

    p = x N + 1 x ( 0 , N ) .

    Worked Example of the Third Variant

    Consider the ordered list {15, 20, 35, 40, 50}, which contains five data values. What is the 40th percentile of this list using the NIST method?

    First we calculate the rank of the 40th percentile as follows:

    x = 40 100 ( 5 + 1 ) = 2.4

    So x=2.4, which gives us x = 2 and x % 1 = 0.4 . So the value of the 40th percentile is calculated as:

    v ( 2.4 ) = v 2 + 0.4 ( v 3 v 2 ) = 20 + 0.4 ( 35 20 ) = 26

    So the value of the 40th percentile of the ordered list {15, 20, 35, 40, 50} using this variant method is 26.

    Definition of the Weighted Percentile method

    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 w 1 , w 2 , w 3 , , w N associated, respectively, with our N sorted sample values. Let

    S n = k = 1 n w k ,

    the n -th partial sum of the weights. Then the formulas above are generalized by taking

    p n = 100 S N ( S n w n 2 )

    and

    v = v k + P p k p k + 1 p k ( v k + 1 v k ) .

    The 50% weighted percentile is known as the weighted median.

    References

    Percentile Wikipedia