Select the method or formula of your choice.

The chi-square test statistic is calculated as:

Term | Description |
---|---|

k | number of distinct categories |

O _{i} | observed value for the i ^{th} category |

E _{i} | expected value for the i ^{th} category |

Contribution of the *i* ^{th} category to the chi-square value is:

Term | Description |
---|---|

O _{i} | observed value for the i ^{th} category |

E _{i} | expected value for the i ^{th} category |

The degrees of freedom (DF) is calculated as:

Term | Description |
---|---|

DF | degrees of freedom |

k | number of categories |

The expected value, E, for each category, i, is calculated as:

Term | Description |
---|---|

p _{i} | test proportion for the i ^{th} category, which equals 1/k or the value you provide |

k | number of distinct categories |

N | total observed values (O_{1} + ... + O_{k}) |

O _{i} | observed value for the i ^{th} category |

The p-value is calculated as: *Prob (Χ > Test statistic)*

Term | Description |
---|---|

X | follows a chi-square distribution with k – 1 degrees of freedom |

Given:

Category i | Observed O_{i} |
Test proportions p_{i} |
---|---|---|

A | 5 | 0.1 |

B | 15 | 0.2 |

C | 10 | 0.3 |

D | 10 | 0.4 |

N=40 |

Calculated:

Category i | Expected value
E |
Contribution to chi-square
(O |
---|---|---|

A | 0.1 * 40 = 4 | (5 – 4)^{2} / 4 = 0.2500 |

B | 0.2 * 40 = 8 | (15 – 8)^{2} / 8 = 6.1250 |

C | 0.3 * 40 = 12 | (10 – 12)^{2} / 12 = 0.3333 |

D | 0.4 * 40 = 16 | (10 – 16)^{2} / 16 = 2.2500 |

χ^{2} = 0.2500 + 6.1250 + 2.2500 + 0.3333 = 8.9583

DF = k – 1 = 3

p-value = Prob (Χ > 8.9583) = 0.0299

Term | Description |
---|---|

DF | degrees of freedom |

k | number of categories |