I am trying to solve an exercise of Maximum Likelihood estimation for a situation where standard conditions of regularity are not satisified and I would appreciate it if someone could audit/check my reasoning.
$X=(X_1,X_2,...,X_m)$ is a sample from the binomial distribution $Bin(n,q)$
$n$ is an unknown natural number and q is a known parameter between 0 and 1. I need to find a ML estimator for n (NOT for q, which is known!)
Below is my reasoning, in 4 points.
A. The likelihood function is $L(n,q;X)=\prod_{i=1}^{m} [\binom{n}{x_i} q^{x_i} (1-q)^{n-x_i} I_{\{0,1,2,...n\}}(x_i)]$
and this is equal to $L(n,q;X)=[\prod_{i=1}^{m} \binom{n}{x_i}] [q^{\sum_{i=1}^{m}x_i}] [(1-q)^{mn-\sum_{i=1}^{m}x_i}] [\prod_{i=1}^{m}I_{\{0,1,2,...n\}}(x_i)]$
B. The last term is equivalent to $\prod_{i=1}^{m}I_{\{0,1,2,...n\}}(x_i)=I_{\{0,1,2,...n\}}(max\ x_i)=I_{(max\ x_i,+\infty)}(n)$
This means that $L$ is zero for any n lower than the highest $x_i$
C. Since $(1-q)\leq 1$ , we have that $d\over dn$$[(1-q)^{mn-\sum_{i=1}^{m}x_i}]\leq 0$
D. $\forall i,\ \binom{n}{x_i}=$$n!\over x_i!(n-x_i)!$$=$$n[n-1][n-2]...[n-(n-x_i)]!\over x_i!(n-x_i)!$$=$$n(n-1)(n-2)...[n-(n-x_i)+1]\over (n-x_i)! $
We have $n-x_i$ terms in the numerator and the denominator. Hence we can rewrite the above as
$n(n-1)(n-2)...[n-(n-x_i)+1]\over (n-x_i)!$$=$$ n\over (n-x_i)$$(n-1)\over (n-x_i-1)$$(n-2)\over (n-x_i-2)$$...$$[n-(n-x_i)+1]\over 1$
The derivative of each of the multiplicands with respect to n is negative.
CONCLUSIONS:
- $L$ is non-zero only for values greater than $max\ x_i$
- When $L$ is non-zero, $L$ is a decreasing function of n
- Hence, $L$ is maximised when $n=max\ x_i$ which is therefore the ML estimator
Could someone check this reasoning?
...But the number of "multiplicands" increases with $n$ hence this does not allow to conclude.
To solve this, one can first note (as you did) that $L_n=0$ if $n\lt s$, where $s=\max(x_i)$, and then that, if $n\gt s$, the ratio of the likelihoods at $n$ and $n-1$ is $$ \frac{L_n}{L_{n-1}}=(1-q)^m\prod_{i=1}^m\frac{n}{n-x_i}=\frac{(1-q)^m}{\prod\limits_{i=1}^m\left(1-\frac{x_i}n\right)}, $$ hence $L_n\gt L_{n-1}$ if and only if $n$ is such that $(1-q)^m\gt\vartheta_n$, where $$ \vartheta_n=\prod\limits_{i=1}^m\left(1-\frac{x_i}n\right). $$ Note that $\vartheta_n$ is increasing with $n$ on $n\gt s$, to the limit $1$ when $n\to\infty$, hence there are two cases: