• The null hypothesis for r×c tables of count data is that there is no relationship between the row variable and the column variable.
• Expected cell counts under the null hypothesis are computed using the formula
expected count= row total×column totaln
• The null hypothesis is tested by the chi-
X2=∑(observed−expected)2expected
Under the null hypothesis, X2 has approximately the χ2 distribution with (r−1)(c−1) degrees of freedom. The P-value for the test is
P (χ2≥X2)
where χ2 is a random variable having the χ2(df) distribution with
df=(r−1)(c−1).
• The chi-
• For two-
• Two different models for generating r×c tables lead to the chi-