Excel卡方检验,chisq.test()对数据排列有要求
##Excel卡方檢驗(yàn),chisq.test()對(duì)數(shù)據(jù)排列有要求
---------------|----------------------
實(shí)際數(shù)| 64| 57.84| 理論數(shù)
實(shí)際數(shù)| 51| 57.16| 理論數(shù)
實(shí)際數(shù)| 21 |27.16| 理論數(shù)
實(shí)際數(shù) |33 |26.84 |理論數(shù)
P值= 0.247684448 是錯(cuò)誤的
##正確的數(shù)據(jù)排列是 :
實(shí)際數(shù) 64 21
51 33
理論數(shù) 57.84 27.16
57.16 26.84
P值 chisq.test(b1:c2,b3:c4)=0.042110012
R軟件計(jì)算如下:
x<-matrix(c(64,51,21,33),2)
x
[,1] [,2]
[1,] 64 21
[2,] 51 33
chisq.test(x,correct = FALSE)
data: x
Pearson’s Chi-squared test
X-squared = 4.1305, df = 1, p-value = 0.04212
總結(jié)
以上是生活随笔為你收集整理的Excel卡方检验,chisq.test()对数据排列有要求的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: IMT-2020(5G)推进组的《5G网
- 下一篇: ML之FE:机器学习算法/数据挖掘中特征