Independent two-samples test in Matlab
Yang Runhuai
1
杨润怀(1987-),男,讲师,生物3D打印
Zhang Zhen
1
Yang Siqiao
1
Liang Zhen
1
梁振(1981-),男,副教授,临床工程
1、Life Science School, Anhui medical university, hefei, 230032
Abstract:Purpose: Based on the principle of independent two-samples test and code it in matlab. The code will automatically select the statistical method and calculate statistical results. Method: Firstly,the program judges the two groups of samples whether obey the normal distribution; If any sample does not obey the normal distribution,the K-S and M-W U test were used to test whether distribution of the samples are the same; If both of the two samples obey the normal distribution, then uses the F test to judge whether the two samples have equal variance. if the variance is equal, then uses the t test directly; If the variance is not equal, then uses Satterthwaite to calibration and uses t test. Results: we achieved the above functions in matlab, and the two instance confirm the rightness of the code. Conclusion: This paper provides a method which can automatically chooses the statistical method for the independent two-samples test, and give reliable statistical results.