I am trying to solve an problem from Rice's Mathematical Statistics and Data Analysis (Problem 9.41) and I got stuck doing some computation. Namely, let $X_i\sim\text{Bin}(n_i,p_i)$ for $i = 1,\dots,m$. I am supposed to devise a log-likelihood ratio test for the null hypothesis $H_0: p_1 =\cdots=p_m$, alternative being that not all are equal, and also to find its large sample distribution. I have computed the likelihood ratio to be
$$ \Lambda = \frac{\prod_{i = 1}^m \hat p_i^{x_i}(1-\hat p_i)^{n_i-x_i}}{\hat p^{\sum_{i=1}^mx_i}(1-\hat p)^{\sum_{i=1}^m n_i-x_i}}, $$ where $\hat p_i = x_i/n_i$ and $$\hat p= \frac{\sum_{i=1}^m x_i}{\sum_{i=1}^m n_i}. $$ However, when I try to compute $2\text{log} \Lambda $, I do not get anything remotely useful. I know that the large sample distribution is supposed to be $\chi^2(m-1)$, but I do not have any idea how to arrive at that conclusion.
[self-study]
tag & read its wiki. $\endgroup$