Skip to main content

Crate lib_jsl_statistics

Crate lib_jsl_statistics 

Source
Expand description

Statistics: descriptive statistics, correlation, distributions (univariate and multivariate), hypothesis tests (including Cramér-von Mises, Brunner-Munzel and Tukey’s HSD), effect sizes for contingency tables, kernel density estimation and the bootstrap.

See the book chapter Statistics.

Modules§

bootstrap
The nonparametric bootstrap: standard errors and confidence intervals by resampling.
comparisons
More tests comparing samples, following scipy.stats: equal variances (Levene, Bartlett, Fligner-Killeen), rank tests (Kruskal-Wallis, Friedman, Wilcoxon signed-rank), exact tests (Fisher’s exact test for 2 × 2 tables, the binomial test), permutation tests, and the adjustment of p-values for multiple comparisons (Benjamini-Hochberg, Benjamini-Yekutieli, Holm, Bonferroni).
contingency
Effect sizes for contingency tables (SciPy’s odds_ratio, relative_risk and contingency.association), with confidence intervals.
correlation
Covariance and correlation: Pearson, Spearman and Kendall.
descriptive
Descriptive statistics of a sample.
distance
Distances between observations, following scipy.spatial.distance: the standard metrics, the condensed pairwise distances of one set (pdist), the distances between two sets (cdist), and conversion between condensed and square forms (squareform).
distributions
Probability distributions as objects, following scipy.stats: each continuous distribution provides its density, distribution and survival functions, quantiles, moments, sampling and maximum-likelihood fitting through ContinuousDistribution and Fit; the discrete ones through DiscreteDistribution.
goodness_of_fit
The Cramér-von Mises tests (SciPy’s cramervonmises and cramervonmises_2samp): the integrated squared difference between a sample’s empirical distribution function and a hypothesised one, or between two samples’ empirical distribution functions.
hypothesis_tests
Classical hypothesis tests.
kernel_density
Kernel density estimation with a Gaussian kernel.
location_scale
More location, scale and shape summaries, following scipy.stats: trimmed means (trim_mean), standard scores (zscore), the mode, circular statistics (circmean, circvar, circstd), and the maximum-likelihood Box-Cox transform (boxcox, boxcox_llf, boxcox_normmax).
multivariate
Multivariate distributions (SciPy’s multivariate_normal, multivariate_t, dirichlet, wishart, invwishart and multinomial): densities, moments, entropies and sampling. Matrices are Vec<Vec<f64>> of rows.
mvn_cdf
Distribution functions of the multivariate normal and t distributions by Genz’s quasi-Monte Carlo method (SciPy’s multivariate_normal.cdf and multivariate_t.cdf), the exact bivariate normal distribution function (Drezner and Wesolowsky, as Genz’s bvnu), and Dunnett’s many-to-one comparisons (SciPy’s dunnett).
normality
Tests of normality, following scipy.stats: Shapiro-Wilk (shapiro, Royston’s algorithm AS R94), Anderson-Darling (anderson_normal), Jarque-Bera (jarque_bera) and D’Agostino and Pearson’s omnibus test (normaltest, from skewtest and kurtosistest).
posthoc
The studentized range distribution and Tukey’s honestly significant difference test (SciPy’s studentized_range and tukey_hsd).
qmc_normal
Quasi-Monte Carlo samples from a multivariate normal distribution (SciPy’s stats.qmc.MultivariateNormalQMC).
regression
Straight-line fits: least squares with its standard errors and test (SciPy’s linregress), and the robust median-of-slopes estimators of Theil and Sen (theilslopes) and Siegel (siegelslopes).