Maximum Likelihood estimator for n in binomial with known p

5.6k Views Asked by At

I have a question concerning the ML-estimation of the trials of a Binomial variable. The setting is the following:

I have a random variable $X\sim Bin(n,p)$ with $n\in\mathbb{N}$ unknown, $p\in (0,1)$ the known success probability and with density (w.r.t. to the counting measure) $p_n(x)=\binom{n}{x}p^x(1-p)^{n-x}=:L_x(n)$. The log-likehood function is therefore given by $$l_x(n)=\log L_x(N)=\log(n!)-\log(x!)-\log((n-x)!)+x\log(p)+(n-x)\log(1-p) .$$ Maximizing $l_x(n)$ w.r.t. to $n$ is equivalent to maximizing $\log(n!)-\log((n-x)!)+n\log(1-p)$ or $\frac{n!}{(n-x)!}(1-p)^n$.

My problem is that I don't know how to proceed from here. A person in this thread Maximum likelihood estimate of $N$ (trials) in Binomial suggested that a solution is given by $\hat{n}=X/p$. However, $X/p\notin \mathbb{N}$ for most $p$, so I suspect that this can't be the answer.

1

There are 1 best solutions below

6
On BEST ANSWER

Consider $\dfrac{{n+1 \choose x}p^x(1-p)^{n+1-x}}{{n \choose x}p^x(1-p)^{n-x}} = \dfrac{(n+1)}{(n+1-x)}(1-p)$ which is less than $1$ when $n > \dfrac{x}{p}-1$, and so choosing $n+1$ in such a case would not give you a maximum likelihood estimate

Thus, given $x$ and $p$, your maximum likelihood estimate of $n$ is $\bigg\lfloor\dfrac{x}{p}\bigg\rfloor$ (rounding down)

unless $\dfrac{x}{p}$ is an integer in which case there are two with equal likelihood: $\dfrac{x}{p}-1$ and $\dfrac{x}{p}$