PDF, CDF, and percent-point/quantile functions for the normal and Student’s t distributions
🎉 Zero dependencies
Add this line to your application’s Cargo.toml
under [dependencies]
:
distrs = "0.2"
use distrs::Normal;
Normal::pdf(x, mean, std_dev);
Normal::cdf(x, mean, std_dev);
Normal::ppf(p, mean, std_dev);
use distrs::StudentsT;
StudentsT::pdf(x, df);
StudentsT::cdf(x, df);
StudentsT::ppf(p, df);
no_std
- enableno_std
support (requires libm)
- Algorithm AS 241: The Percentage Points of the Normal Distribution
- Algorithm 395: Student’s t-distribution
- Algorithm 396: Student’s t-quantiles
View the changelog
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/dist-rust.git
cd dist-rust
cargo test