Question: Let $X_1, . . . , X_n$ be a random sample with $X_1 \sim N(\mu, 1)$ where $\mu \geq 0$. Derive the maximum likelihood estimator of $\mu$.
I have some difficulties understanding the question.
I already calculated the MLE of $\mu$ when $X_1,...,X_n$ are a random sample from $N(\mu,\sigma^2)$. In that case the MLE of $\mu$ is $\hat{\mu} = \bar{X}$.
Is it the same case here? Or does the $\mu\geq 0$ changes anything? Or maybe the question states that $X_2,...,X_n\sim N(\mu, \sigma^2)$? I'm not that familiar with statistic jargon.
Knowing that $\sigma^2 =1$ slightly simplifies the calculation of the log-likelihood and the maximum likelihood estimator of $\mu$. But that is only part of the answer.
If $\bar X \le 0$ then knowing $\mu \ge 0$ means using $\hat \mu = \bar X$ would have zero likelihood. In such a case, you can do the analysis, but it is intuitively obvious that $\hat \mu = 0$ would maximise the likelihood. If you need to combine the results then you could say the maximum likelihood estimator is $$\hat \mu = \max(0, \bar X).$$