I'm going to collect a sample of data that comes from an unknown, likely continuous, probability distribution. I don't really know anything about the data other than that it's somewhat chaotic. I want to know how to calculate a given percentile.
For example, suppose the dataset is 10 items, but I want to calculate the distribution's 95th percentile (the dataset isn't actually that small, this is just an example.) 95% of 10 is 9.5, and obviously there's no 9.5th smallest item.
So how do I calculate a percentile of this unknown distribution?
R
forquantile
, accessed via?quantile
, gives insights into methods of calculating quantiles. For instance, forx <- seq(1, 100, 1)
, I get different answers forquantile(x, 0.504)
andquantile(0.505)
. $\endgroup$