# Maximum likelihood estimate of 1 Bernoulli trial?

I was recently asked to calculate the maximum likelihood estimate of a single Bernoulli trial. Since the MLE of a binomial distribution is just the mean of the observed number of successes, I reasoned that the MLE of a single Bernoulli trial is either $$0$$ or $$1$$, depending on whether the trial resulted in a success or not.

• Note that you're not producing an estimate of a trial (per your title and first sentence) but an estimate of a parameter (specifically, the parameter $p$ in a Bernoulli distribution). Aug 4, 2019 at 10:32
Yes, it is correct because we maximize the following data likelihood (say $$x$$ is the outcome of the experiment): $$f(\theta)=p(D|\theta)=p(x|\theta)=\theta^x(1-\theta)^{1-x}$$ It won’t be completely accurate if we differentiate this (and it’s not well defined when $$x=0,\theta=0$$ and $$x=1,\theta=1$$) because the function won’t be differentiable in general at the ML answer; and we don’t need to. Leaving the general definition aside, we’ll consider case by case, since $$x$$ is finite. If $$x=1$$, the likelihood becomes $$f(\theta)=\theta$$, and this is maximized when $$\theta=1$$; If $$x=0$$, $$f(\theta)=1-\theta$$, which is maximized when $$\theta=0$$.