Automated unpaired 2 sample statsitical test

バージョン 1.0.7 (19.8 KB) 作成者: Nirvik Sinha
An automated interface to computation of one-sided/two-sided p-value using appropriate unpaired 2-sample parametric / non-parametric tests.

ダウンロード: 48

更新 2020/7/22


1. The Mann-Whitney U test (which is often used as a non-parametric alternative to independent sample t-test) ha a high false positive rate when the two samples have unequal higher order moments (e.g. unequal variance) [1]. Fligner and Pollicello's robust rank order test corrects this short-coming [2].
2. However, when the sample distributions cannot be assumed to be normal, they are often fallaciously assumed to be at least symmetric which is rarely the case. In fact in such cases, the absolute performance of both the above non-parametric tests is poor. Additionally, the convergence of the test statistic to standard normal distribution is often slow (as the sample sizes increase) [2,3].
3. Hence, this function adopts a boot-strapped Monte-Carlo method to dynamically approximate the critical values for the test statistic of the non-parametric tests. This technique has the advantage of making no assumptions about data distributions and therefore significantly reduce the bias in these tests [3].
4. This function requires Statistics and Machine Learning Toolbox
5. Written and tested in MATLAB R2020a

LIMITATIONS : 1. This function is only valid for continuous data.

1.Fligner, M.A. and Pollicello, G.E. III. (1981). “Robust Rank Procedures for the Behrens-Fisher Problem.” Journal of the American Statistical Association. 76, 162–168.
2. Feltovich, N. Nonparametric Tests of Differences in Medians: Comparison of the Wilcoxon–Mann–Whitney and Robust Rank-Order Tests. Experimental Economics 6, 273–297 (2003).
3. Boos, D.D. and Brownie, C. (1988). “Bootstrap p-Values for Tests of Nonparametric Hypotheses.” Institute of Statistics Mimeo Series No. 1919, North Carolina State University.


Nirvik Sinha (2023). Automated unpaired 2 sample statsitical test (, MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2020a
R2018b 以降のリリースと互換性あり
Windows macOS Linux

ヒントを得たファイル: fitmethis

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート

Updated BS_non_param random generator seeding and reduced MC trials to 1000 for making runtime practical.


Updated notes.


1. Added normal approximation where sample size for both sets > 100.
2. Added Hodges-Lehman shift operation for equalizing samples for NULL hypothesis bootstrap.


Re-uploaded new files after correction of p-value calculation in previous version


Corrected p-value calculation from test statistic distribution


Added display image


Added citations.