My question:
I usually don't have much trouble with deriving the MLE from the log-likelihood, but I am a little stumped on an example I found in "In All Likelihood" [1] pg.75.
Could someone show the steps from the log-likelihood to the MLE?
What the book says: Discrete data are usually presented in grouped form. For example, suppose $x_1, ..., x_N$ are iid sample from binomial($n,\theta$) with $n$ known. We first summarize the data where
$$ \begin{array}{c|c c c c} k& 0 & 1 & \dots &n \\ \hline n_k& n_0&n_1 &\dots &n_n\\ \end{array} $$
where $n_k$ is the number of $x_i$'s equal to $k$, so $\sum_k n_k = N$. We can now think of the data ($n_0,\ldots,n_n$) as having a multinomial distribution with probabilities ($p_0,\dots,p_n$) given by the binomial probabilities
$$ p_k = {n\choose k} \theta^k(1-\theta)^{n-k} $$
The log-likelihood is given by
$$ \log L(\theta)= \sum_{k=0}^n n_k\log p_k. $$
We can show that the MLE is $\theta$ is
$$ \hat{\theta} = \frac{\sum_k kn_k}{Nn} $$
with standard error
$$ \operatorname{se}(\hat{\theta}) = \sqrt{\frac{\hat{\theta}(1-\hat{\theta})}{Nn}} $$
[1] Y. Pawitan, (2001), 'In All Likelihood: Statistical Modelling and Inference Using Likelihood', Oxford University Press.