In: Statistics and Probability
For each of the following questions, report 1) the appropriate statistical test or estimation procedure to use, 2) the null and alternate hypotheses, 3) the test statistic, 4) the P value, 5) whether you accept or reject the null, then 6) a sentence or two about what the results mean.
A student wanted to know if there was a difference between the sexes in basic food preference. Final results were: 65 females preferred salty and 35 preferred sweet. 46 males preferred salty and 54 preferred sweet.
Solution:
Here, we have to use chi square test for independence of two categorical variables.
Null hypothesis: H0: There was no difference between the sexes in basic food preference.
Alternative hypothesis: Ha: There was a difference between the sexes in basic food preference.
We assume level of significance = α = 0.05
Test statistic formula is given as below:
Chi square = ∑[(O – E)^2/E]
Where, O is observed frequencies and E is expected frequencies.
E = row total * column total / Grand total
We are given
Number of rows = r = 2
Number of columns = c = 2
Degrees of freedom = df = (r – 1)*(c – 1) = 1*1 = 1
α = 0.05
Critical value = 3.841459
(by using Chi square table or excel)
Calculation tables for test statistic are given as below:
Observed Frequencies |
|||
Sex |
|||
Row variable |
Male |
Female |
Total |
Salty |
46 |
65 |
111 |
Sweet |
54 |
35 |
89 |
Total |
100 |
100 |
200 |
Expected Frequencies |
|||
Sex |
|||
Row variable |
Male |
Female |
Total |
Salty |
55.5 |
55.5 |
111 |
Sweet |
44.5 |
44.5 |
89 |
Total |
100 |
100 |
200 |
Calculations |
|
(O - E) |
|
-9.5 |
9.5 |
9.5 |
-9.5 |
(O - E)^2/E |
|
1.626126 |
1.626126 |
2.02809 |
2.02809 |
Test Statistic = Chi square = ∑[(O – E)^2/E] = 7.308432
χ2 statistic = 7.308432
P-value = 0.006863
(By using Chi square table or excel)
P-value < α = 0.05
So, we reject the null hypothesis
There is sufficient evidence to conclude that there was a difference between the sexes in basic food preference.