In: Statistics and Probability
This is a 5 number summary for the number of children born.
min | 1st Qart | Median | Mean | 3rd Quar | Max |
---|---|---|---|---|---|
0.00 | 1.00 | 3.00 | 3.261 | 4.00 | 16.00 |
Explain why it would be inappropriate to conduct a chi square test for contraceptive method and number of children ever born. Hint look at the output for the following R command (table(dat3$contrMethod, dat3$noKids))
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | |
1 | 95 | 143 | 114 | 70 | 57 | 44 | 35 | 18 | 29 | 5 | 9 | 6 | 4 | 0 | 0 |
2 | 0 | 46 | 56 | 70 | 62 | 36 | 27 | 19 | 9 | 3 | 2 | 2 | 0 | 1 | 0 |
3 | 2 | 87 | 106 | 119 | 78 | 55 | 30 | 12 | 9 | 8 | 0 | 3 | 0 | 1 | 1 |
|
Rcode
(table2)=c("0","1","2","3","4","5","6","7","8","9","10","11","12","13","16")
> rownames(table2)=c("0","1","2")
> table2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 16
0 95 143 114 70 57 44 35 18 29 5 9 6 4 0 0
1 0 46 56 70 62 36 27 19 9 3 2 2 0 1 0
2 2 87 106 119 78 55 30 12 9 8 0 3 0 1 1
> chisq.test(table2)
Pearson's Chi-squared test
data: table2
X-squared = 219.09, df = 28, p-value < 2.2e-16
Warning message:
In chisq.test(table2) : Chi-squared approximation may be
incorrect