Answer:
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 .
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
The statistic to check the hypothesis is given by:
The table given represent the observed values, we just need to calculate the expected values with the following formula
And the calculations are given by:
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:
Now we can calculate the degrees of freedom for the statistic given by:
And we can calculate the p value given by:
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 .