In: Statistics and Probability
The table below shows the number of graveyard shift, swing shift, and day shift workers (variable called JOB SHIFT) by "coffee drinking" and "non-coffee drinking" (variable called AWAKE). Test the null hypothesis that the two variables are unrelated by doing the following:
(Answer: Chi-square = 10.08)
(this includes your decision concerning the null hypothesis).
JOB SHIFT
Graveyard Swing Day
AWAKE
Coffee drinkers 45 35 25
Non-coffee drinkers 24 26 40
H0: Two variables are unrelated
H1: Two variables are related
let the los be alpha = 5%
The observed frequencies are
Graveyard | Swing | Day | Total | |
Coffee drinkers | 45 | 35 | 25 | 105 |
Non Coffee drinker | 24 | 26 | 40 | 90 |
Total | 69 | 61 | 65 | 195 |
The expected frequencies are
Graveyard | Swing | Day | Total | |
Coffee drinkers | 37.154 | 32.846 | 35 | 105 |
Non Coffee drinker | 31.846 | 28.154 | 30 | 90 |
Total | 69 | 61 | 65 | 195 |
The chi-square contribution values are
Oi | Ei | (Oi-Ei) | (Oi-Ei)^2 /Ei |
45 | 37.154 | 7.846 | 1.6569 |
35 | 32.846 | 2.154 | 0.1413 |
25 | 35 | -10 | 2.8571 |
24 | 31.846 | -7.846 | 1.933 |
26 | 28.154 | -2.154 | 0.1648 |
40 | 30 | 10 | 3.3333 |
Total: | 10.0864 |
Degrees of freedom: 2
Test Statistic, X^2: 10.0865
Critical X^2: 5.991471
Since Chi-square value > Chi-square critical value so we reject H0
Thus we conclude that two variables are related