The pth percentile is a value so that roughly p% of the data is smaller and (100-p)% of the data is larger. Percentiles can be computed for ordinal, interval, or ratio data.
There are three steps for computing a percentile.
- Sort the data from low to high;
- Count the number of values (n);
- Select the p*(n+1) observation.
You can't always be so lucky to have p*(n+1) be a nice whole number.
Here are some contingencies.
- If p*(n+1) is not a whole number, then go halfway between the two adjacent numbers.
- If p*(n+1) < 1, select the smallest observation.
- If p*(n+1) > n, select the largest observation.
The following data represents response times. We want to compute the 50th percentile.
73, 58, 67, 93, 33, 18, 147
Sorted data: 18, 33, 58, 67, 73, 93, 147
There are n=7 observations.
Select 0.50*(7+1)=4th observation.
Therefore, the 50th percentile equals 67. Notice that there are three observations larger than 67 and three observations smaller than 67.
Suppose we want to compute the 20th percentile. Notice that p*(n+1) =0.20*(7+1)=1.6. This is not a whole number so we select halfway between 1st and 2nd observation or 25.5. (Some people see the 1.6 and
think they have to go six tenths of the way to the second value. You can do this if you like, but I think life is too short to worry about such details.)
Suppose we want to compute the 10th percentile. Since 0.10*(7+1)=0.8, we should select the smallest observation which is 18.