982 B
982 B
stats
An expressive implementation of statistical distributions. Compatible with crystal v0.18
Installation
Add this to your application's shard.yml
:
dependencies:
Stats:
github: Nephos/stats
Usage
require "stats"
You should read the specs to understand how it works.
NormaleDistribution::between standard_deviation: 15, esperance: 100, min: 85, max: 115 # => 0.6826894921370859
Math.binomial_distribution(tries: 3, probability: 0.5, success: 1) # => 0.375
Development
- The lib is adapted to be usable with BigInt and BigFloat values
Contributing
- Fork it ( https://github.com/Nephos/crystal_proba/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- Nephos Arthur Poulet - creator, maintainer