# Maximum likelihood given $\bar{x}$

I have a problem where i am uncertain how to set up a likelihood function

The number of tries before the first success follows a geometric distribution.

$$P(X=k)=(1-p)^{(k-1)}*p$$

In a sample (n=100, iid) a mean number of tries was found to be 7.

So normally without the additional information setting the max. likelihood up as normal.

But now, as i only that that the mean number of tries was seven, not the actual 100 outcomes, can i say that

$$\prod \limits_{n=1}^{100}(1-p)^6*p$$

But solving this i get a negative estimator for p, which doesn’t ring true....

It seems logical to incorporate as much information as possible into my maximum likelihood estimate....

Or could it be possible that i don’t have to integrate the information because there is a point b, (a confidence Intervall) where i would need the mean of x.

• how do you get a negative estimate? gradient of log likelihood is $100(\frac{1}{p}-\frac{6}{1-p})$. The maximum is at the point $p=\frac{1}{7}$ having 100 identical terms just increases the sharpness of the peak. – probabilityislogic May 9 at 5:29
• @probabilityislogic oh i made a stupid mistake, now i get p=1/7, but another question, is the Likelihood function correct? – Ang May 9 at 5:33

Your likelihood is correct because, if you have the entire data: $$x_1,...,x_{n}$$, the likelihood would be $$L(p)=\prod_{i=1}^{n} (1-p)^{x_i-1}p=(1-p)^{\sum x_i -n}p^n$$ which is your expression. Differentiating it (or log of it) will yield $$p=1/7$$ as your estimate.