title: Calculate 95th percentile in Ruby?
body: <p>This question here does not seem to help: <a href="https://stackoverflow.com/questions/2609597/calculating-percentiles-ruby">Calculating Percentiles (Ruby)</a></p>
  
  <p>I would like to calculate 95th percentile (or, indeed, any other desired percentile) from an array of numbers. Ultimately, this will be applied in Rails to calculate distribution against a large number of records.</p>
  
  <p>But, if I can determine how to accurately determine a given percentile from an array of numbers, I can take it from there.</p>
  
  <p>Frankly, I am surprised that I haven't been able to find some sort of gem that would have such functions--I haven't found one yet.</p>
  
  <p>Help is greatly appreciated.</p>