Expand description
Statistical Hypothesis Testing
Implements classical hypothesis tests for comparing distributions and testing relationships.
§Tests
- t-tests: Compare means (one-sample, two-sample, paired)
- chi-square: Test categorical distributions (goodness-of-fit, independence)
- ANOVA: Compare multiple group means (F-test)
§Example
ⓘ
use aprender::stats::hypothesis::{ttest_ind, TTestResult};
let group1 = vec![2.3, 2.5, 2.7, 2.9, 3.1];
let group2 = vec![3.2, 3.4, 3.6, 3.8, 4.0];
let result = ttest_ind(&group1, &group2, true).unwrap();
println!("t-statistic: {:.4}, p-value: {:.4}", result.statistic, result.pvalue);Structs§
- Anova
Result - Result of an ANOVA F-test.
- ChiSquare
Result - Result of a chi-square test.
- TTest
Result - Result of a t-test.
Functions§
- chisquare
- Chi-square goodness-of-fit test: Tests if observed frequencies match expected.
- f_
oneway - One-way ANOVA: Tests if multiple groups have the same mean.
- ttest_
1samp - One-sample t-test: Tests if sample mean differs from population mean.
- ttest_
ind - Independent two-sample t-test: Tests if two independent samples have different means.
- ttest_
rel - Paired t-test: Tests if paired samples have different means.