Взял кое-каких данных... См.
[1] и
[2] CENSUS <- c(872136,1026810)
QUIZ <- c(1097,1928)
cr.sex.table <- data.frame(CENSUS,QUIZ)
cr.sex.chi <- chisq.test(cr.sex.table)
> cr.sex.chi
Pearson's Chi-squared test with Yates' continuity correction
data: cr.sex.table
X-squared = 113.17, df = 1, p-value < 2.2e-16
> cr.sex.chi$observed
CENSUS QUIZ
[1,] 872136 1097
[2,] 1026810 1928
> cr.sex.chi$expected
CENSUS QUIZ
[1,] 871844.2 1388.838
[2,] 1027101.8 1636.162
> cr.sex.chi$residuals
CENSUS QUIZ
[1,] 0.3125522 -7.830982
[2,] -0.2879621 7.214876
This entry was originally posted at
http://kouprianov.dreamwidth.org/316648.html Comment wherever you wish.