Stats Lodestar.Stats - CyrilB1531/lodestar GitHub Wiki
Lodestar.Stats
Classical hypothesis tests with scipy.stats' semantics: Student and Welch t, Mann-Whitney
U, Wilcoxon signed-rank, chi-square and its contingency form, Fisher exact, Kolmogorov-Smirnov,
Shapiro-Wilk, Anderson-Darling and its k-sample form, one-way ANOVA, Kruskal-Wallis, Levene,
Bartlett, Fligner-Killeen, Friedman, the binomial test, and the correlation tests, Spearman's
matrix and the point-biserial included. Each returns its statistic and p-value, with scipy's
alternatives and nan_policy. It also publishes the normal, Student, chi-squared and F
distributions' tails, densities and quantiles, the tails and quantiles its neighbours call among
them.
Install
dotnet add package Lodestar.Stats
Example
using Lodestar.Stats;
double[] before = [102.0, 98.0, 110.0, 105.0, 99.0];
double[] after = [95.0, 92.0, 99.0, 91.0, 97.0];
TTestResult result = TTest.Independent(before, after); // Welch's test by default
bool significant = result.PValue < 0.05; // True
Parity
Replayed against scipy.stats.
docs/equivalence.md maps each Python call to its C#
counterpart, with every deliberate divergence.
Dependencies
A core package (decision 0003),
built for net10.0 and netstandard2.0:
Lodestar.Abstractions0.2.1 or later
Documentation
- Guide: hypothesis testing
- Reference: stats/nanpolicy
- Reference: stats/tails
- Reference: stats/tests
- Changelog
- Performance
- All packages