# Χ^{2} Test Hypothesis Tests for Variance Case II

The chi-squared (Χ^{2}) test provides the basis for the second case of hypothesis tests for variance. In this case we want to compare observed and expected frequencies, or counts, of outcomes when there is no defined variance, in other words we are working with attribute data.

Contingency table or row and column 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:

1. Determine the observed frequencies (O) for the various conditions under comparison. For example, the number of defects from each of three processes. Layout value in a table.

2. Assuming no differences exist among the processes (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.

3. Compare the observed and expected frequencies using the following calculation for each condition:

4. Sum all the conditions to determine the Χ^{2} Statistic.

5. Determine the critical value using the Χ^{2} table or probability calculation. The degrees of freedom is the number of rows minus 1 times the number of columns minus one.

6. 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 three inspection stations provide the same results or not. Each station should detect a specific dimension fault on a finished bicycle frame. In order to evaluate the test stations we collected 90 frame of which 30 have the fault. Each test station evaluated each of the 90 frames in random order. The observed results are below.

Test Stations | Observed Results | |||
---|---|---|---|---|

#1 | #2 | #3 | ||

Defects Detected | 27 | 25 | 22 | 74 |

Defects Not Detected | 3 | 5 | 8 | 16 |

Totals | 30 | 30 | 30 | 90 |

Is there any convincing difference in the test stations (use 95% confidence).

## Solution

Null Hypothesis: H_{0}: p_{1} = p_{2} = p_{3}, or there is no difference among the three test stations.

Alternative hypothesis: H_{a}: p_{1} ≠ p_{2} ≠ p_{3}

Step 1. The observations are in the table above.

Step 2. The expected values are in the table below.

TEST STATIONS | OBSERVED RESULTS | |||
---|---|---|---|---|

#1 | #2 | #3 | ||

Defects Detected | 24.67 | 24.67 | 24.67 | 74 |

Defects Not Detected | 5.33 | 5.33 | 5.33 | 16 |

Totals | 30 | 30 | 30 | 90 |

Step 3. Compare the observed and expected frequencies.

The following table has the results of the ( O – E )2 / E

TEST STATIONS | ||||
---|---|---|---|---|

#1 | #2 | #3 | ||

Defects Detected | 0.220 | 0.004 | 0.289 | |

Defects Not Detected | 1.019 | 0.020 | 1.338 | |

Step 4. Total the expected vs observed values.

The tally is the Χ^{2} statistic

Χ^{2} = 0.220 + 0.004 + 0.289 + 1.019 + 0.020 + 1.338 = 2.89

Step 5. Determine the critical value.

The degrees of freedom = (rows -1)(columns – 1) = ( 2 -1 )( 3 – 1 ) = 2.

Using a Χ^{2} table or calculation we find there is only a 5% chance that the calculated value will exceed 5.99.

Step 6. Compare the test statistic and critical value.

Since the calculated value, 2.89, is less then the critical value, 5.99, there is not convincing evidence the test stations are different.