Expand description
Hypothesis testing.
Parametric and non-parametric statistical tests: t-tests, ANOVA, chi-squared tests, and normality tests.
§Examples
use u_analytics::testing::{one_sample_t_test, TestResult};
let data = [5.1, 4.9, 5.2, 5.0, 4.8, 5.3, 5.1, 4.9];
let result = one_sample_t_test(&data, 5.0).unwrap();
assert!(result.p_value > 0.05); // cannot reject H₀: μ = 5.0Structs§
- AdNormality
Result - Result of the Anderson-Darling normality test (Stephens 1974 variant).
- AdfResult
- Result of the Augmented Dickey-Fuller (ADF) unit root test.
- Anderson
Darling Result - Result of the Anderson-Darling normality test.
- Anova
Result - Result of one-way ANOVA.
- Mann
Kendall Result - Result of the Mann-Kendall trend test.
- Shapiro
Wilk Result - Result of the Shapiro-Wilk normality test.
- Test
Result - Result of a hypothesis test.
Enums§
- AdfModel
- Model specification for the ADF test.
Functions§
- adf_
test - Augmented Dickey-Fuller (ADF) unit root test for stationarity.
- anderson_
darling_ normality - Anderson-Darling normality test (Stephens 1974): H₀: data is normally distributed.
- anderson_
darling_ test - Anderson-Darling normality test: H₀: data is normally distributed.
- bartlett_
test - Bartlett test for equality of variances: H₀: all groups have equal variance.
- benjamini_
hochberg - Benjamini-Hochberg FDR correction.
- bonferroni_
correction - Bonferroni correction: adjusts p-values for multiple comparisons.
- chi_
squared_ goodness_ of_ fit - Chi-squared goodness-of-fit test: H₀: observed matches expected distribution.
- chi_
squared_ independence - Chi-squared test of independence on a contingency table.
- fisher_
exact_ test - Fisher exact test for a 2×2 contingency table.
- jarque_
bera_ test - Jarque-Bera normality test: H₀: data is normally distributed.
- kruskal_
wallis_ test - Kruskal-Wallis test: H₀: all groups have the same distribution.
- levene_
test - Levene test for equality of variances: H₀: all groups have equal variance.
- mann_
kendall_ test - Mann-Kendall non-parametric trend test with Sen’s slope estimator.
- mann_
whitney_ u_ test - Mann-Whitney U test: H₀: the two populations have the same distribution.
- one_
sample_ t_ test - One-sample t-test: H₀: μ = μ₀.
- one_
way_ anova - One-way ANOVA: H₀: all group means are equal.
- paired_
t_ test - Paired t-test: H₀: mean difference = 0.
- shapiro_
wilk_ test - Shapiro-Wilk normality test: H₀: data is normally distributed.
- two_
sample_ t_ test - Two-sample Welch t-test: H₀: μ₁ = μ₂ (unequal variances).
- wilcoxon_
signed_ rank_ test - Wilcoxon signed-rank test: H₀: median of differences = 0.