I have the following list:
[1, 2, 6, 2, 2, 8, 8] and python gives me the following values for percentiles for each of the element:
[14.28, 42.85, 71.42, 42.85, 42.85, 92.85, 92.85]
Can anyone explain how to calculate them by hand?
I have the following list:
[1, 2, 6, 2, 2, 8, 8] and python gives me the following values for percentiles for each of the element:
[14.28, 42.85, 71.42, 42.85, 42.85, 92.85, 92.85]
Can anyone explain how to calculate them by hand?
Sort.
$1, \color{green}2, \color{green}2, \color{green}2, 6, \color{blue}8, \color{blue}8$
Take the ranks.
$1, \color{green}2, \color{green}3, \color{green}4, 5, \color{blue}6, \color{blue}7$
Average the ranks of equal elements.
$1, \color{green}3, \color{green}3, \color{green}3, 5, \color{blue}{6.5}, \color{blue}{6.5}$
In the original order.
$1, \color{green}3, 5, \color{green}3, \color{green}3, \color{blue}{6.5}, \color{blue}{6.5}$
Divide by 7 and express in percents.