Consider a random sample of size $n$ from a distribution with probability density function (pdf) is given by

$$f(x;\theta)=\left\{\begin{matrix} \sqrt{\frac{2}{\pi}}e^{-\frac{1}{2}(x-\theta)^2}&\text{if }\space x\geq \theta \\ 0&\text{elsewhere} \end{matrix}\right.$$

Find the maximum likelihood estimator of $\theta$.

My attempt,

\begin{align}L(\theta)&=\prod_{i=1}^{n}\sqrt{\frac{2}{\pi}}e^{-1/2(x_i-\theta)^2}\\&=\exp\left(-\frac{1}{2}\sum_{i=1}^{n}(x_i-\theta)^2\right)\cdot \textrm{constant}\end{align}

$$\therefore~\log L=-\frac{1}{2}\sum_{i=1}^{n}(x_i-\theta)^2+\textrm{constant}$$

\begin{align}\frac{\partial}{\partial \theta}\log L&=\sum_{i=1}^{n}(x_i-\theta)\\&=\sum_{i=1}^{n}x_i-n\theta\\\implies n\theta &=\sum_{i=1}^{n}x_i\\ \implies \hat{\theta}&=\bar{x}\end{align}

Am I correct?

  • 2
    $\begingroup$ Yes you found how to get the MLE for the mean of a Gaussian distributed sample. $\endgroup$ Commented Jun 19, 2018 at 14:53
  • 4
    $\begingroup$ @MartijnWeterings Given the constraint on the support, which leaves us with the right half of a unit variance Gaussian, I would imagine the MLE of $\theta$ is much smaller than $\bar{x}$ $\endgroup$
    – khol
    Commented Jun 19, 2018 at 15:30
  • 2
    $\begingroup$ When the support depends on the parameter, instead of flatly differentiating (which isn't really justified here), pay attention to the parameter space given the sample. $\endgroup$ Commented Jun 19, 2018 at 15:50
  • 1
    $\begingroup$ @khol I had missed that part. It is indeed as Jarle stated. For the half normal distribution the likelihood function is zero unless $\theta$ is smaller than the smallest $x_i$. Thus you get a $\mathcal{L}(\theta)$ which is a parabolic function centered at $\bar{x}>x_{(1)}$, but cut off to 0 at the point $x_{(1)}$. $\endgroup$ Commented Jun 19, 2018 at 16:59

1 Answer 1


For $\theta\le x_{(1)}$ the likelihood is an increasing function of $\theta$ and for $\theta>x_{(1)}$, the likelihood is zero. Hence, the MLE of $\theta$ is $\hat\theta=X_{(1)}$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.