Pearson's chi-squared test uses a measure of goodness of fit, which is the sum of differences between observed and expected outcome frequencies (that is, counts of observations), each squared and divided by the expectation:
where
The expected frequency is calculated by:
where
Example
Employers want to know which days of the week employees are absent in a five day work week. Most employers would like to believe that employees are absent equally during the week. Suppose a random sample of 60 managers were asked on which day of the week did they have the highest number of employee absences. The results were distributed as follows:
- Monday: 15
- Tuesday: 12
- Wednesday: 9
- Thursday: 9
- Friday: 15
Solution
The null and alternate hypotheses are:
If the absent days occur with equal frequencies then, out of
Calculate the
- Expected (
$E$ ) values ($12$ ,$12$ ,$12$ ,$12$ ,$12$ ) - Observed (
$O$ ) values ($15$ ,$12$ ,$9$ ,$9$ ,$15$ ) -
$\left( O-E \right)$ -
${ \left( O-E \right) }^{ 2 }$ -
$\dfrac { { \left( O-E \right) }^{ 2 } }{ E }$
Now add (sum) the values of the last column. Verify that this sum is
To find the
The degrees of freedom are one fewer than the number of cells:
Conclusion
The decision is to not reject the null hypothesis. At a