Skip to main content

Module permutation

Module permutation 

Source
Expand description

Permutation tests — assumption-free hypothesis testing by resampling.

Under the null hypothesis that two groups are exchangeable, the labels carry no information, so the sampling distribution of any test statistic is obtained by shuffling the pooled data and recomputing it. The p-value is the fraction of shuffles whose statistic is at least as extreme as the observed one. No distributional assumption — the honest empirical twin of a parametric test.

Structs§

PermutationResult
Result of a two-sample permutation test.

Functions§

two_sample_test
Two-sample permutation test of statistic(a) − statistic(b) (e.g. a difference of means). Pools the two samples, repeatedly shuffles and re-splits into the original sizes, and compares. None on an empty sample. The statistic closure maps a group slice to a scalar.