Treat the two row totals as fixed sample sizes, with independent multinomial observations within each row. More generally let be an by table, row totals , column totals and total . Under the unrestricted alternative, row has its own category probabilities ; independence means that all rows have the same probabilities .
Ignoring the multinomial coefficients, which cancel in a likelihood ratio, the unrestricted likelihood is . Maximizing under gives . Under the null, the log likelihood is , giving . Thus the null fitted counts are , and the generalized likelihood ratio is
A zero observed count contributes zero by continuity. Small , equivalently large , is evidence against independence. The unrestricted model has free probabilities and the null has , a difference of . Under the usual large-sample likelihood-ratio approximation at an interior null, has a chi-squared distribution with that many degrees of freedom. This is the likelihood-ratio test of independence in a contingency table. Sampling the entire table multinomially instead gives the same statistic and degrees of freedom after estimating the row probabilities.
For the supplied data the fitted counts are
Substitution gives
There are degrees of freedom. The supplied 1% critical value is , and . Do not reject independence at the 0.01 level. The approximate chi-squared tail probability is . This lack of rejection does not establish that the classifications are independent; the test supplies no evidence against that null here. All fitted counts are at least ten, making the stated asymptotic approximation reasonable.

Articles by others on the same topic (0)

There are currently no matching articles.