# Exercise on MLE with hypergeometric distribution

I am struggling with the following exercise from Stapleton's book (it's exercise 7.4.1).

A box contains eight eggs, of which an unknown number $$R$$ are rotten. You take a simple random sample of three eggs. Let $$X$$ be the number of rotten eggs in the sample.

• Find the MLE of $$R$$ (Warning: don't use calculus.)
• What is the MLE for $$E(X) = 3(R/8)$$?

For the first question, we can compute the likelihood of having $$X$$ rotten samples given $$R$$ as: $$p(X|R) = {R \choose X}{8 - R \choose 3 - X}/{8\choose 3}.$$ This leads to the following table ($$X$$ changes along a column, $$R$$ along a row): $$\begin{array}{lccccccccc} X|R & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline 0 & 1 & 0.625 & 0.357 & 0.179 & 0.0714 & 0.0179 & 0 & 0 & 0\\ 1 & 0 & 0.375 & 0.536 & 0.536 & 0.429 & 0.268 & 0.107 & 0 & 0\\ 2 & 0 & 0 & 0.107 & 0.268 & 0.429 & 0.536 & 0.536 & 0.375 & 0\\ 3 & 0 & 0 & 0 & 0.0179 & 0.0714 & 0.179 & 0.357 & 0.625 & 1 \end{array}$$ In this case the maximum likelihood estimator would be $$R=0$$ for $$X=0$$, $$R=8$$ for $$X=3$$, but I do not understand how to choose one between $$R=2$$ and $$R=3$$ for $$X=1$$, given that both answers have the same likelihood.

For the second question, I am not sure. I suspect I should compute the likelihood of $$E(X)$$ like this:

$$L(E(X)=\mu|R) = \sum_{i=0}^3 i\cdot p(i|R),$$ where $$p(i|R)$$ can be read on the table above. But maybe I am misunderstanding the question.

• If likelihood is maximized for two values of $R$, then both are MLE. For the second question, use invariance/equivariance of MLE. Commented Feb 6, 2021 at 14:57
• Please add self-study as a tag. Commented Feb 6, 2021 at 16:54
• @StubbornAtom good point, so I should just say that the MLE estimate of $E(X)$ is just $3/8$ times whatever is the MLE estimate of $R$? This follows from the theorem you mention and a quick check that $E(X)$ is a one-to-one function of $R$. Commented Feb 6, 2021 at 18:41
• Yes, but invariance property holds for any function of MLE. Commented Feb 6, 2021 at 19:00