1

Question from Michael Baron's Probability and Statistics for Computer Scientists, 2nd edition:

Data: 3 7 5 3 2. Assume data is produced from Geometric distribution. Estimate $p$, the geometric distribution parameter. (Geometric distribution: $P(x) = (1-p)^{x-1}p$, $x=1,2,...$)

My solution, using method of maximum likelihood: Find $M = \sum_{i=1}^5 \ln(P(x_i))$. Then solve for $\frac{dM}{dp}=0$.

  • $M = \sum_{i=1}^5 \ln((1-p)^{x_i - 1}p)=15\ln(1-p)+ 5\ln p$
  • $\frac{dM}{dp}=0=\frac{15}{1-p}+\frac{5}{p} \to p=-\frac{1}{2}$

This is obviously wrong, as $p$ is a probability. I did this twice, what am I doing wrong?

O. Altun
  • 365

2 Answers2

1

From chain rule, when we differentiate, you miss out a negative sign.

It is suppose to be

$$-\frac{15}{1-p}+\frac5p=0$$

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
0

You may also proceed directly:

$$f(p)=\prod_{i=1}^5P(x_i) = p^5(1-p)^{3+7+5+3+2-5}= p^5(1-p)^{15} \stackrel{!}{\rightarrow}\mbox{Max for } p \in (0,1)$$ You get $$f'(p) = 0 \Leftrightarrow 5(1-p)-15p = 0 \Leftrightarrow \boxed{p = \frac{1}{4}}$$