0
$\begingroup$

I'm trying to understand MLE, but struggling with a question/example, so was hoping for an explanation if someone can help.

There's a ring toss game which is repeated until it's succeeds for the first time. Each time the game is played, it succeeds with the probability p; and each attempt is independent.

I have the following probability function of X. $\ f(x)=p(1−p)^{x-1}$

I'm trying to work out the MLE of p (given a single observation x of X). Would someone know how to go about this? What I'm struggling with here is that the number of attempts, as it isn't fixed and instead is just 'n'.

$\endgroup$
2
$\begingroup$

Your likelihood function is $$ L(p \mid x) = p \left(1 - p\right)^{x - 1}. $$ Differentiating with respect to $p$, $$ \begin{aligned} \frac{d L}{d p}(p \mid x) &= \left(1 - p\right)^{x - 1} - p (x - 1) \left(1 - p\right)^{x - 2} \\ &= (1 - p)\left(1 - p\right)^{x-2} - (p x - p) \left(1 - p\right)^{x - 2} \\ &= (1 - p - p x + p) \left(1 - p\right)^{x - 2} \\ &= (1 - p x) \left(1 - p\right)^{x - 2}. \end{aligned} $$ Setting this equal to zero (since the derivative of $L(p \mid x)$ at $p$ is zero if $L(p \mid x)$ is at a maximum), we get $$ (1 - p x) \left(1 - p\right)^{x - 2} = 0. $$ Assuming $p < 1$, it follows that $\left(1 - p\right)^{x - 2} \neq 0$, so $1 - p x = 0$, and hence $p = 1 / x$. Thus, the maximum likelihood estimate of $p$ is $$ \hat{p} = \frac{1}{x}. $$

$\endgroup$
  • 2
    $\begingroup$ You should avoid giving out questions to homework questions. Instead, consider giving hints. $\endgroup$ – StatsStudent Feb 7 '19 at 1:30
  • 1
    $\begingroup$ @Ben sure, but this case is so easy there's no need to take logs in my opinion $\endgroup$ – Artem Mavrin Feb 7 '19 at 1:34
  • 1
    $\begingroup$ Agree - either method is fine in this case. $\endgroup$ – Reinstate Monica Feb 7 '19 at 1:35
  • 1
    $\begingroup$ Just to improve this answer, may I recommend that you use $\hat{p}$ to denote the estimator, rather than $p$. Also, it would be worth flagging what happens to the MLE when $x=0$, since in that case, your expression for the estimator is undefined. $\endgroup$ – Reinstate Monica Feb 7 '19 at 1:36
  • 1
    $\begingroup$ @StatsStudent I think sometimes it’s useful to see an entire answer worked out so that you can learn how to approach similar problems $\endgroup$ – Artem Mavrin Feb 7 '19 at 1:38
1
$\begingroup$

Since you have a single observation, you have $n=1$. So the likelihood function for the observed data is:

$$L_x(p) = p(1-p)^{x-1} \quad \quad \quad \text{for all } 0 \leqslant p \leqslant 1.$$

As the name suggests, the maximum-likelihood estimator is the value that maximises the likelihood function:

$$\hat{p}(x) = \underset{0 \leqslant p \leqslant 1}{\text{arg max }} L_x(p)$$

In this particular case, this is just a basic calculus problem, where you are trying to maximise the likelihood function with respect to a continuous argument variable. Since the likelihood function is a product of non-negative parts that depend on $p$, it is usual to find the maximising value by maximising the log-likelihood function (i.e., the logarithm of the likelihood function). If you apply standard calculus methods to maximise this function, you will be able to derive the maximum-likelihood estimator $\hat{p}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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