Percentile

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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 percent of the observations may be found. 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 in the 86th percentile, it is higher than 86% of the other scores.

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[edit]

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 limits is too high or low.[citation needed]

The normal distribution and percentiles[edit]

Representation of the 68–95–99.7 rule. The dark blue zone represents observations within one standard deviation (σ) to either side of the mean (μ), which accounts for about 68.2% of the population. Two standard deviations from the mean (dark and medium blue) account for about 95.4%, and three standard deviations (dark, medium, and light blue) for about 99.7%.

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 \sigma 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 known as the 68–95–99.7 rule or the three-sigma rule.[dubious ] 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.

Definition[edit]

There is no standard definition of percentile,[1] [2][3] however all definitions yield similar results when the number of observations is very large.[4]

Nearest rank[edit]

One definition of percentile, often given in texts, is that the P-th percentile (0 \le P \le 100) of N ordered values (arranged from least to greatest) is the smallest value in the data such that P percent of the data is less than or equal to that value. This is obtained by first calculating the (ordinal) rank

 n =  \left \lceil \frac{P}{100} \times N  \right \rceil

and then taking the value that corresponds to that rank.

For example, by this definition, given the numbers

15, 20, 35, 40, 50

the rank of the 30th percentile would be

n = \left\lceil \frac{30}{100} \times 5 \right \rceil = \lceil 1.5 \rceil = 2.

Thus the 30th percentile is the second number in the sorted list, 20.

The 40th percentile would have rank

n = \left \lceil \frac{40}{100} \times 5 \right \rceil = \lceil 2 \rceil = 2,

so the 40th percentile would again be the second value, 20.

The 50th percentile would have rank

n = \left \lceil \frac{50}{100} \times 5 \right \rceil = \lceil 2.5 \rceil = 3,

so the 50th percentile would be the third value, 35.

The 100th percentile is defined to be the largest value. (In this case we do not use the above definition with P=100, because the rank n would be greater than the number N of values in the original list.)

In lists with fewer than 100 values the same number can occupy more than one percentile group.

Linear interpolation between closest ranks[edit]

An alternative to rounding used in many applications is to use linear interpolation between the two nearest ranks.

In particular, given the N sorted values v_1 \le v_2 \le v_3 \le \dots \le v_N, we define the percent rank corresponding to the nth value as:

p_n=\frac{100}{N}\left(n-\frac{1}{2}\right).

In this way, for example, if N=5 then the percent rank corresponding to the third value is:

p_3=\frac{100}{5}\left(3-\frac{1}{2}\right)=50.

The value v of the P-th percentile may now be calculated as follows:[5]

If P<p_1 or P>p_N, then we take v=v_1 or v=v_N, respectively.

If there is some integer k for which P=p_k, then we take v = v_k.

Otherwise, we find the integer k for which p_k < P < p_{k+1}, and take

v=v_k + \frac{P-p_k}{p_{k+1}-p_k}(v_{k+1}-v_k)=v_k+N\times\frac{P-p_k}{100}(v_{k+1}-v_k).

Using the list of numbers above, the 40th percentile would be found by linearly interpolating between the 30th percentile, 20, and the 50th, 35. Specifically:

v=20+5\times\frac{40-30}{100}(35-20)=27.5

This is halfway between 20 and 35, which one would expect since the rank was calculated above as 2.5.

It is readily confirmed that the 50th percentile of any list of values according to this definition of the P-th percentile is just the sample median.

Moreover, when N is even the 25th percentile according to this definition of the P-th percentile is the median of the first \frac{N}{2} values (i.e., the median of the lower half of the data).

Weighted percentile[edit]

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, \dots, w_N associated, respectively, with our N sorted sample values. Let

S_n=\sum_{k=1}^n w_k,

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

p_n=\frac{100}{S_N}\left(S_n-\frac{w_n}{2}\right)

and

v=v_k+\frac{p-p_k}{p_{k+1}-p_k}(v_{k+1}-v_k).

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

Alternative methods[edit]

Some software packages, including Microsoft Excel[3] (up to and including version 2010, 2013 unverified) use the following method, noted as an alternative by NIST[6] to estimate the value, v_P, of the P-th percentile of an ascending ordered dataset containing N elements with values v_1 \le v_2 \le \dots \le v_N.

The rank is calculated:

n = \frac{P}{100}(N-1)+1

and then split into its integer component k and decimal component d, such that n = k + d. Then v_P is calculated as:

 v_P = \begin{cases}
  v_1, & \text{for }k=0 \\
  v_N, & \text{for }k=N \\
  v_k+d(v_{k+1}-v_k), & \text{for }0 < k < N
  \end{cases}

The primary method recommended by NIST[6] is similar to that given above, but with the rank calculated as

n = \frac{P}{100}(N+1)

These two approaches give the rank of the 40th percentile in the above example as, respectively:

n = \frac{40}{100}(5-1)+1=2.6

and

n = \frac{40}{100}(5+1)=2.4.

The values are then interpolated as usual based on these ranks, yielding 29 and 26, respectively, for the 40th percentile.

Microsoft Excel's Algorithm[edit]

Let N be the number of values . P be the percentile where 0<P<1.

Then, (N-1)P=k+d, where k=integer part and d=decimal part (ex: 4.5 = 4+ 0.5)

Then, P th percentile is : v_{k+1} + d (v_{k+2} - v_{k+1})

Example : For the array 1,2,3,4 N=4 and P=.75(say) Then, (N-1)P+1 = (4-1)*0.75 + 1 = 2.25

P_{th percentile} = v_{2+1} + 0.25 (v_{2+2} - v_{2+1})  = 3 + 0.25 (4-3)  = 3.25

See also[edit]

References[edit]

  1. ^ Hyndman RH, Fan Y (1996). "Sample quantiles in statistical packages". The American Statistician 50 (4): 361–365. doi:10.2307/2684934. JSTOR 2684934. 
  2. ^ Lane, David. "Percentiles". Retrieved 2007-09-15. 
  3. ^ a b Pottel, Hans. "Statistical flaws in Excel". Retrieved 2013-03-25. 
  4. ^ Schoonjans F, De Bacquer D, Schmid P (2011). "Estimation of population percentiles". Epidemiology 22 (5): 750–751. doi:10.1097/EDE.0b013e318225c1de. 
  5. ^ "Matlab Statistics Toolbox – Percentiles". Retrieved 2006-09-15. , This is equivalent to Method 5 discussed here
  6. ^ a b "Engineering Statistics Handbook: Percentile". NIST. Retrieved 2009-02-18. 

External links[edit]