What is the log-likelihood formulation for a combined normally distributed dataset?

25 Views Asked by At

Consider a sample (i.i.d) $C_{1},...,C_{n}$ that is normally distributed ~$N(µ,1)$ and a sample (i.i.d) $D_{1},...,D_{n}$ ~$N(\theta,1)$, we say $µ\neq\theta$.

Now I want to formulate a log-likelhood function for the combined dataset, X with $2n$ observations. Would it be valid to formulate it like:

$l=-\frac{n}{2}log\left(2\pi\right)-\frac{1}{2}\sum_{i=1}^{n}\left(C_i-\mu\right)^2-\frac{n}{2}log\left(2\pi\right)-\frac{1}{2}\sum_{i=1}^{n}\left(D_i-\theta\right)^2$