我想知道两个不同长度的数字列表之间是否存在显著差异(一个列表有25个值,另一个有104个值(。这两个列表都是非正态分布的,并且它们彼此独立(如不是前后测量或类似的测量(。有人能帮我做什么测试以及如何在R上进行测试吗?
出于兴趣,哪种测试适用于数据正态分布的相同情况(以及如何在R上进行(?
通常使用Wilcoxson检验。你可以在这里阅读
如何在R:中做到这一点
### Part 1: Creating some data to work with
short = rpois(25, 10) # Create a random list of 25 values
long = rpois(104, 3) # Create a random list of 104 values
boxplot(short, long) # Plot the two lists
### Part 2: Running the Wilcoxon test
wilcox.test(short, long)
输出:
Wilcoxon rank sum test with continuity correction
data: short and long
W = 2543, p-value = 8.87e-14
alternative hypothesis: true location shift is not equal to 0