daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Maths::Statistics::Vector#percentil
Returns the value of the percentile q Accepts an optional second argument specifying the strategy to interpolate when the requested percentile lies between two data points a and b Valid strategies are: * :midpoint (Default): (a + b) / 2 * :linear : a + (b - a) * d where d is the decimal part of the index between a and b. == References This is the NIST recommended method (http://en.wikipedia.org/wiki/Percentile#NIST_method)
Edit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/maths/statistics/vector.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--Maths--Statistics--Vector-percentil-for-pr
# Commit to gitgit add lib/daru/maths/statistics/vector.rbgit commit -m "better docs for Daru::Maths::Statistics::Vector#percentil"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Daru--Maths--Statistics--Vector-percentil-for-pr
hub pull-request
# Celebrate!