The chi-square ( $- \chi^2 -$) test provides a means to determine independence between two or more variables. In this case, it works for count data.
Contingency table or row and column (r x c) analysis are other common names for this analysis. It is useful when comparing results from different treatments or processes.
Procedure
There is a six-step procedure for this analysis:
- Determine the observed frequencies (O) for the various conditions under comparison. For example, the number of people with specific attributes (position in the organization, for example) and their opinions on the state of the reliability program. Layout the values in a table.
- Assuming no differences exist among the attributes (conditions under scrutiny) calculate the expected frequencies (E). The expected value therefore for each condition (cell in table) becomes the( row total x column total ) divided by the grand total.
- Compare the observed and expected frequencies using the following calculation for each condition:
$$ \large\displaystyle \frac{{{\left( O-E \right)}^{2}}}{E}$$
- Sum all the conditions to determine the Χ2 Statistic.
$$ \large\displaystyle {{\chi }^{2}}=\sum\limits_{i,j}{\left[ \frac{{{\left( {{O}_{ij}}-{{E}_{ij}} \right)}^{2}}}{{{E}_{ij}}} \right]}$$
where Oij and Eij are the observed and expected number of measurements falling in the cell for the ith row and nth column.
- Determine the critical value using the $- \chi^2 -$ table or probability calculation. The degree of freedom is the number of rows minus 1 times the number of columns minus one.
- Compare the test statistic to the critical value and determine if a convincing difference exists at a specific confidence level.
Problem
A bicycle manufacturer wants to determine if managers and factory staff have the same opinion of the current reliability program. They did a survey and asked everyone if they considered the current reliability program good or poor.
As part of the survey data analysis, we wanted to determine if the opinions were related to position in the organization (manager or staff). The observed results are below.
Position | ||||
---|---|---|---|---|
Staff | Manager | |||
Good | 27 | 5 | 32 | |
Poor | 3 | 5 | 8 | |
Totals | 30 | 10 | 40 |
Is there any convincing difference in the test stations (use 95% confidence).
Solution
Null Hypothesis: H0: The two variables, position and opinion, are independent.
Alternative hypothesis: The two variables are dependent.
Step 1. The observations are in the table above.
Step 2. The expected values are in the table below.
Position | ||||
---|---|---|---|---|
Staff | Manager | |||
Good | 24 | 8 | 32 | |
Poor | 6 | 2 | 8 | |
Totals | 30 | 10 | 40 |
Step 3. Compare the observed and expected frequencies.
The following table has the results of the ( O – E )2 / E
Position | ||||
---|---|---|---|---|
Staff | Manager | |||
Good | 0.375 | 1.125 | ||
Poor | 1.5 | 4.5 |
Step 4. Total the expected vs observed values.
The tally is the $- \chi^2 -$ statistic
Χ2 = 0.375 + 1.125 + 1.5 + 4.5 = 7.5
Step 5. Determine the critical value.
The degrees of freedom = (rows -1)(columns – 1) = ( 2 -1 )( 2 – 1 ) = 1.
Using a $- \chi^2 -$ table or calculation we find there is only a 5% chance that the calculated value will exceed 3.841.
Step 6. Compare the test statistic and critical value.
Since the calculated value, 7.5, is greater than the critical value, 3.841, there is convincing evidence the opinions depend on the person’s position.
Related:
Hypothesis Tests for Variance Case II (article)
Contingency Coefficient (article)
Hypothesis Tests for Variance Case I (article)
Leave a Reply