An urn has W white balls where W is unknown. Suppose that R=5 Red balls are added to the urn and then a random sample of N=10 balls is selected. But this time, Suppose that we continue to draw balls one at a time without replacement until the last Red ball is selected. Let R=5 be the number of Red alls added and suppose that the last (5=Rth) ball is drawn on the K=13th draw. Find the MLE for W.
Attempt: Without replacement means its a hypergeometric problem. I'm supposed to use excel to solve this problem and I know excel has a built in HYPGEOM.DIST() function where we plug in 5 variables: K which is for Prob(X=K), N which is the number of balls, T which is teh total # of balls in the urn, S which is the number of "success" balls and a zero which is a flag. My issue is that I input this : HYPGEOM.DIST(13,10,5,10-A) where A represents the number of balls drawn which increases by each trial. What am I doing wrong?
Firstly, I see the probability calculation as:
$$P(\mbox{$5^{th}$ red ball occurs on $13^{th}$ ball}) = P(\mbox{$4$ red balls in sample of $12$}) \times P(13^{th} \mbox{ ball is red})$$
because the first $4$ red balls can occur anywhere in the first $12$ balls drawn but the last red ball must be the $13^{th}$ ball drawn.
Now, $P(\mbox{$4$ red balls in sample of $12$})$ does have hypergeometric distribution and in Excel, defining "success" as a white ball, we want the $5$ parameters to be:
\begin{eqnarray*} 1: && \mbox{Number of "successes" in sample} &=& 12-4 = 8 \\ 2: && \mbox{Size of sample} &=& 12 \\ 3: && \mbox{Number of "successes" in population} &=& A1 \\ 4: && \mbox{Size of population} &=& A1 + 5 \\ 5: && \mbox{Cumulative} &=& \mbox{False} \end{eqnarray*}
Column $A$ is assumed to have the number of white balls in the population, taking values $8,9,\ldots$. It's obviously impossible for there to be fewer than $8$ white balls.
For the second factor on the RHS of the above equation, after $12$ balls are drawn, $4$ of which are red, we have $1$ red ball and $A1 - 8$ white balls left in the urn. Therefore:
$$P(13^{th} \mbox{ ball is red}) = \dfrac{1}{A1 - 7}$$
Therefore, the Excel formula needed is:
$$HYPGEOM.DIST(8,12,A1,A1+5,FALSE)/(A1-7)$$
This gave me output:
\begin{eqnarray*} A && B \\ 8 && 0.384615385 \\ 9 && 0.247252747 \\ 10 && 0.164835165 \\ 11 && 0.113324176 \\ 12 && 0.079993536 \\ 13 && 0.057773109 \\ 14 && 0.042569659 \\ 15 && 0.031927245 \\ 16 && 0.02432552 \\ 17 && 0.018796992 \\ 18 && 0.01471069 \\ 19 && 0.011645963 \\ 20 && 0.00931677 \end{eqnarray*}