给出来自完全相同的正态分布的500个值的2个样本(平均值10和标准差2),我运行t检验100,000次:
replicate(100,000, (t.test(rnorm(500,10,5), rnorm(500,10,5))))
输出如下:
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[50] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[99] 0 0
[编辑]如果我删除逗号以运行它100000,因为显然它不是之前, 它出来了
[,98011] [,98012]
[,98013] [,98014]
[,98015] [,98016]
[,98017] [,98018]
[,98019] [,98020]
[,98021] [,98022]
[,98023] [,98024]
[,98025] [,98026]
我对这些输出感到有点困惑......
我现在如何找到P值低于0.05的情况的分数,当它只显示零时?