Answer :
Answer:
[tex]\chi^2 = \frac{(21-12)^2}{12}+\frac{(16-12)^2}{12}+\frac{(10-12)^2}{12}+\frac{(8-12)^2}{12}+\frac{(5-12)^2}{12}=13.833[/tex]
[tex]p_v = P(\chi^2_{4} >13.833)=0.00785[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(13.833,4,TRUE)"
Since the p value is lower than the significance level we can reject the null hypothesis at 5% of significance, and we can conclude that the drowsiness are NOT equally distributed among office workers .
Step-by-step explanation:
Previous concepts
A chi-square goodness of fit test "determines if a sample data matches a population".
A chi-square test for independence "compares two variables in a contingency table to see if they are related. In a more general sense, it tests to see whether distributions of categorical variables differ from each another".
Assume the following dataset:
Method Beverage Nap Walk Snack Other
Number 21 16 10 8 5
The total on this case is 60
We need to conduct a chi square test in order to check the following hypothesis:
H0: Drowsiness are equally distributed among office workers
H1: Drowsiness IS NOT equally distributed among office workers
The level of significance assumed for this case is [tex]\alpha=0.1[/tex]
The statistic to check the hypothesis is given by:
[tex]\chi^2 = \sum_{i=1}^n \frac{(O_i -E_i)^2}{E_i}[/tex]
The table given represent the observed values, we just need to calculate the expected values with the following formula [tex]E_i = \frac{total}{5}[/tex]
And the calculations are given by:
[tex]E_{Beverage} =\frac{60}{5}=12[/tex]
[tex]E_{Nap} =\frac{60}{5}=12[/tex]
[tex]E_{Walk} =\frac{60}{5}=12[/tex]
[tex]E_{Snack} =\frac{60}{5}=12[/tex]
[tex]E_{Other} =\frac{60}{5}=12[/tex]
And the expected values are given by:
Method Beverage Nap Walk Snack Other
Number 12 12 12 12 12
And now we can calculate the statistic:
[tex]\chi^2 = \frac{(21-12)^2}{12}+\frac{(16-12)^2}{12}+\frac{(10-12)^2}{12}+\frac{(8-12)^2}{12}+\frac{(5-12)^2}{12}=13.833[/tex]
Now we can calculate the degrees of freedom for the statistic given by:
[tex]df=(catgories-1)=(5-1)=4[/tex]
And we can calculate the p value given by:
[tex]p_v = P(\chi^2_{4} >13.833)=0.00785[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(13.833,4,TRUE)"
Since the p value is lower than the significance level we can reject the null hypothesis at 5% of significance, and we can conclude that the drowsiness are NOT equally distributed among office workers .