Test for homogeneity

Now for each row $x$, we make a fixed number $n_x$ of samples. Model as $$ \begin{align*} (N_{x1}, \ldots, N_{xc}) \sim \mathrm{Multinomial}(n_x; p_{1\mid x}, \ldots, p_{c\mid x}). \end{align*} $$ Test $H_0:p_{y\mid x}$ does not depend on $x$ against $H_1: p_{y\mid x}$ unrestricted (but still $p_{y\mid x}\geq 0$ and $\sum_{y} p_{y\mid x} = 1$), excluding $H_0$.

The test is the same as the test for independence. (Derivation)