Why we take n+1 in percentile. I didn’t got that part

Probably taking an example with fewer elements might help with the intuition part.

Suppose there are` 3 elements`

, and you want to find the location of `50th percentile`

. If you use only `n (instead of n+1)`

, location will be `0.5*3 = 1.5th`

location. That implies only 1st location is less than or equal to `50th percentile`

, which is incorrect, since 2nd location should also have been included (* 2nd location is in middle and hence part of 50th percentile*).

Not that, percentile formula p(n+1)/100 **calculates the location** and **location count starts with 1 (not 0)**.

1 Like