# pramana
**pramana** (Sanskrit: proof/measure/evidence) -- Statistics and probability library for the AGNOS ecosystem.
[](https://github.com/MacCracken/pramana/actions/workflows/ci.yml)
[](https://crates.io/crates/pramana)
[](https://docs.rs/pramana)
[](LICENSE)
## Modules
| `distribution` | Probability distributions (Normal, Uniform, Exponential, Poisson, Binomial, Bernoulli, Gamma, Beta, Chi-Squared, Student-t, F, Cauchy, Weibull, Multivariate Normal) |
| `descriptive` | Descriptive statistics, KDE, correlation matrix, PCA |
| `hypothesis` | Hypothesis testing (t-tests, chi-squared) and confidence intervals |
| `regression` | Linear, polynomial, and logistic regression |
| `bayesian` | Bayesian inference and naive Bayes classification |
| `combinatorics` | Factorials, permutations, combinations, Stirling approximation |
| `monte_carlo` | Monte Carlo integration, Metropolis-Hastings MCMC, Gibbs sampling |
| `markov` | Markov chains, Hidden Markov Models (Forward, Viterbi, Baum-Welch) |
| `timeseries` | Time series: moving average, exponential smoothing, autocorrelation, ARIMA |
## Quick Start
```rust
use pramana::{descriptive, distribution::{Normal, Distribution}, monte_carlo::SimpleRng};
// Descriptive statistics
let data = [1.0, 2.0, 3.0, 4.0, 5.0];
let m = descriptive::mean(&data).unwrap();
let s = descriptive::std_dev(&data).unwrap();
// Fit and sample from a normal distribution
let normal = Normal::new(m, s).unwrap();
let mut rng = SimpleRng::new(42);
let sample = normal.sample(&mut rng);
```
## Building
```bash
cargo build
cargo test
make check # fmt + clippy + test + audit
make bench # criterion benchmarks with history
```
## MSRV
Rust 1.89
## License
GPL-3.0-only. See [LICENSE](LICENSE).