Expand description
Classical hypothesis tests.
See the book entry Hypothesis tests.
Structs§
- Test
Result - A test statistic with its p-value.
Enums§
- Alternative
- The alternative hypothesis.
Functions§
- anova_
one_ way - One-way analysis of variance: the F test of equal group means, on
(k − 1, N − k)degrees of freedom (reported as the between-groups value; the within-groups one isN − k). - chi_
square_ goodness_ of_ fit - Pearson’s chi-square goodness-of-fit test of observed counts against expected frequencies
(uniform when
None; rescaled to the observed total), onk − 1degrees of freedom. - chi_
square_ independence - Pearson’s chi-square test of independence for an
r × ccontingency table (no continuity correction), on(r − 1)(c − 1)degrees of freedom. - kolmogorov_
survival - The Kolmogorov distribution’s survival function
Q(λ) = 2 Σ (−1)^{k−1} e^{−2k²λ²}. - ks_
test_ one_ sample - The one-sample Kolmogorov-Smirnov test of
xagainst a continuouscdf:D = sup |F_n − F|, with the asymptotic p-valueQ((√n + 0.12 + 0.11/√n) D)(Stephens). - ks_
test_ two_ sample - The two-sample Kolmogorov-Smirnov test. The p-value is the asymptotic
Q((√nₑ + 0.12 + 0.11/√nₑ) D)with the effective sizenₑ = nm / (n + m), borrowing Stephens’ one-sample correction; for small samples it can differ from the exact p-value by several per cent (7% for samples of 15 and 25). - mann_
whitney_ u - The Mann-Whitney U test (Wilcoxon rank-sum) for a location shift between two samples. The
statistic is
Uof the first sample; the p-value uses the normal approximation with tie and continuity corrections (adequate for samples above about 10 each). - t_
test_ one_ sample - One-sample Student t-test of the mean against
mu. - t_
test_ paired - Paired t-test: the one-sample test on the differences
x − y. - t_
test_ two_ sample - Two-sample t-test of equal means: Student’s pooled-variance test with
equal_variance, otherwise Welch’s test with the Welch-Satterthwaite degrees of freedom.