Function implements 2 - sample permutation non-parametric statistical test. It allows to set parameter alpha;
Function returns multiple information such as pValue, average difference, HypothesisRejection .
function [pValue, avgDif, measDif, h] = testPermutation(data1, data2, permCounts, alpha, initialSeed)
data1 - first group of data (numerical vector)
data2 - second group of data (numerical vector)
permCounts - count of generated permutation in statistical test (positive integer)
alpha - parameter which setting the significant level (default is 0.02)
initialSeed - number which initialize the random number generator, for generating pseudo random permutations. Identical seed is suitable for reaching the same test results.
pValue - p value of statistical test
avgDif - average Difference reached by permutations
measDif - average Difference measured in 2 groups of data
h - statistical test result (1 = we are rejecting H0 hypothesis, 0 = we are not rejecting H0 hypothesis )
Cite As
Peter Krammer (2026). testPermutation (https://ch.mathworks.com/matlabcentral/fileexchange/182983-testpermutation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2022b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
