# If the MLE is constrained to only two values, ${1,2}$, then what does the MLE become?

Suppose my pdf is some function that requires that $$x\geq0$$ or else it becomes $$0$$. Also, the parameter is $$\theta>0$$. Now, I would like to calculate the MLE of that pdf for $$X_1,...,X_n$$ i.i.d. random variables.

Now, suppose I differentiated with regards to the log-likelihood and found that the derivative is:

$$\frac{\partial l_x(\theta)}{\partial x}=\frac{n}{\theta}-\sum_{i=1}^{n}x_i^2$$

and so we get that

$$\hat{\theta}^{MLE}=\frac{n}{\sum_{i=1}^{n}x_i^2}$$

Now if we were to constrain the parameter space from $$\theta>0$$ to {1,2}, meaning the parameter space for $$\theta$$ is now only 1 or 2, what would my new MLE of $$\theta$$ be?

Thanks!

• The argmax of $\cal{L(1)}$ and $\cal{L(2)}$, by dint of the words "maximum" and "likelihood". Commented Feb 6, 2014 at 0:37

\begin{align} \hat{\theta}^{MLE} &= \text{argmax}_{\theta \in \{1,2\}}\ l_x(\theta)\\ &= \text{argmax }\{l_x(1), l_x(2)\}. \end{align}
In other words, calculate the log-likelihood at each value of $\theta$ in the (discrete) parameter space and determine the value that maximizes the likelihood.