Maximum Likelihood Estimator Question The question is as follows, apologies in advance, I don't know how to do the LaTex thing in posts.
Let $X_1,\ldots,X_n, Y_1,\ldots,Y_n$ be independent random variables such that $X_i \sim N(\mu_1,\sigma^2)$ and $Y_j \sim N(\mu_2,\sigma^2)$. Both $\mu_1$ and $\mu_2$ are known but $\sigma^2$ is not.
Find the maximum likelihood estimator for $\sigma^2$ based on all $n+m$ observations. Show all working.
I am trying to work through with this but I am getting some horrible results when I get to the log-likelihood function. Any help in deriving the log-likelihood function would be appreciated.
Cheers.
 A: Since it's been a year...
The likelihood of a single normal random variable $X_1$ is 
$L_1(\sigma^2 \mid x_1, \mu_1) = \frac{1}{\sqrt{2\pi \sigma^2}}\, \exp\left[-\frac{(x_1 - \mu_1)^2}{2\sigma^2} \right]$, and similar for $Y_1$ but using $\mu_2$ rather than $\mu_1$.
Since the $X_i$ and $Y_j$ are independent, we simply multiply the individual likelihoods to obtain the joint likelihood of $X_1,X_2,\ldots,X_n,Y_1,\ldots,Y_m$:
$\begin{align}
L(\sigma^2 \mid \mu_1,\mu_2,\boldsymbol x, \boldsymbol y)  
&=\prod_{i=1}^n \frac{1}{\sqrt{2\pi \sigma^2}}\, \exp\left[-\frac{(x_i - \mu_1)^2}{2\sigma^2} \right] \prod_{j=1}^m \frac{1}{\sqrt{2\pi \sigma^2}}\, \text{exp}\left[-\frac{(y_j - \mu_2)^2}{2\sigma^2} \right]\\
&= (2\pi\sigma^2)^{-\frac{m+n}{2}}\text{exp}\left[ -\frac{1}{2\sigma^2}\biggl(\sum_{i=1}^n(x_i - \mu_1)^2 + \sum_{j=1}^m(y_j - \mu_2)^2\biggr)\right]
\end{align}$
The question of finding the maximum likelihood of $\sigma^2$ is now a simple maximisation of this function as a function of $\sigma^2$ (note that all other quantities are fixed and known). Take logs, then differentiate, then set to zero, then solve for $\sigma^2$.
