In: Statistics and Probability
there is an old wives tale that women who eat chocolate during pregnancy are more likely to have happy babies. a pregnancy magazine wants to test this claim, and it gathers 100 randomly selected pregnant women for its study. half of the women sampled agreed to eat chocolate at least once a day, while the other half agree to forego chocolate for the duration of their pregnancies. a year later, the ladies complete a survery regarding the overall happiness of their babies. the results are given in the following table. at the 0.01 level of significance, test the old wives' tale.
happy babies | unhappy babies | |
with chocolate | 24 | 26 |
without chocolate | 22 | 28 |
state the null and alternative hypothesis
determine which distrubition to use for the test statistic, and state level of significance
gather date and calculate the necessary sample statistics
and draw a conclusion and interpret the decision
We have to perform chi square test for independence.
H0 : The variables habit of having chocolate during pregnancy and nature of baby are independent.
Ha : The variables habit of having chocolate during pregnancy and nature of baby are dependent.
Observed frequency table :
We need to find expected frequency.
Expected frequency =
For example expected frequency for cell with chocolate and happy babies = ( 50* 46/100) = 23
Expected frequency table :
Now we need to find chi square statistic:
χ2 = ; O is observed and E is expected.
χ2 = 0.161
Critical value:
We are given level of significance α = 0.01
Degrees of freedom (df) = (r-1)(c-1) r is type of habits and c is number of types of nature of babies.
r = 2 and c = 2
df = (2-1)*(2-1) = 1
Therefore critical value χ2(0.01,1) = 6.6349 -------- ( From chi square table )
Critical region : Reject H0 if χ2 is greater than χ2(0.01,1) = 6.6349
fail to reject H0 , if χ2 is less than χ2(0.01,1) = 6.6349
Decision : As χ2 = 0.161 is less than χ2(0.01,1) = 6.6349
We fail to reject H0, so accept H0
Conclusion: We do not have significant evidence that the variables habit of having chocolate during pregnancy and nature of baby are dependent ; that is they are independent.
So the women who eat chocolate during pregnancy are not more likely to have happy babies.