# Likelihood and MLE of iid samples of geometric random variables.

Let $x_1,...,x_n$ be an i.i.d. sample of geometric($p$) random variables with unknown parameter $0<p<1$. Find the likelihood of $p$, and the maximum likelihood estimate.

The pmf is $f(x;p)=(1-p)^{x-1}p$ for $x \in \{ 1,2,3,\dots \}, 0<p<1$.

How do you get from the pmf to the likelihood? I know how to go from there, I just don't know how to get it started. I need help with the first step.

The likelihood of $p$ is the probability of observing $x_1, x_2, \dots, x_n$ given that the parameter is $p$. As the trials are i.i.d., this is just the product of the individual probabilities:

$$\mathcal{L}(p) = \prod_{i=1}^n p (1-p)^{x_i - 1} = p^n (1-p)^{s_n-n}$$

where $s_k = \sum_1^k x_i$.

A maximum likelihood estimate is the maximiser of $\mathcal{L}$, which is the same as the maximiser of $\log \mathcal{L}$ (which is easier to calculate). To find this:

$$\frac{\textrm{d}}{\textrm{d}p} \log \mathcal{L}(p) = \frac{\textrm{d}}{\textrm{d}p} \left( n\log p + (s_n - n) \log (1-p) \right) = 0$$

$$\Rightarrow p = n/s_n.$$

• Note standard notation $$\prod_{i=1}^n p(1-p)^{x_1-1},$$ coded as \prod_{i=1}^n, as opposed to $$\underset{i=1}{\overset{n}{\Pi}} p(1-p)^{x_1-1},$$ coded as \underset{i=1}{\overset{n}{\Pi}}. The former is standard and I edited accordingly. – Michael Hardy Sep 30 '17 at 14:54