= Solution
Up to a parameter-independent multinomial factor, the <likelihood function> is $L=\prod_{i,j}\theta_{ij}^{n_{ij}}$. A <Lagrange multiplier> for $\sum\theta_{ij}=1$ gives $n_{ij}/\theta_{ij}=\lambda$, whence $\lambda=n$ and
$$
\boxed{\widehat\theta_{ij}=n_{ij}/n.}
$$
Since all counts are positive, the <log-likelihood function> is strictly concave on the positive simplex and tends to minus infinity at its boundary, proving this is the unique maximum.
Under <independence of random variables>, $\theta_{ij}=\phi_i\rho_j$, so the <log-likelihood function> separates as $\sum_i n_{i\cdot}\log\phi_i+\sum_jn_{\cdot j}\log\rho_j$. Applying the same constrained maximization twice gives $\widehat\phi_i=n_{i\cdot}/n$, $\widehat\rho_j=n_{\cdot j}/n$, and
$$
\boxed{\widehat\theta_{ij}^{\,0}=n_{i\cdot}n_{\cdot j}/n^2.}
$$
Twice the difference between the unrestricted and null maximized <log-likelihood functions> is
$$
2\log\frac{\sup L}{\sup_{H_0}L}
=2\sum_{i,j}n_{ij}\log\frac{n_{ij}n}{n_{i\cdot}n_{\cdot j}},
$$
the required <likelihood-ratio test statistic>. Under the <null hypothesis>, its asymptotic <chi-squared distribution> has $(r-1)(c-1)$ <statistical degrees of freedom>, the parameter-count difference $(rc-1)-(r+c-2)$. Here that is four. Since $25.192>q_4=18.467$, \b[reject independence at the 0.1 percent significance level]. For four <statistical degrees of freedom>, the asymptotic upper-tail <probability> is $e^{-25.192/2}(1+25.192/2)\approx4.60\times10^{-5}$. This establishes an association in these data; it is not a causal conclusion.
Back to article page