# Frequentist problem about choosing balls without replacement

A box contains $n$ blue balls, 5 red balls and 6 purple balls. Four balls are drawn from the box without replacement.

1. What value of $n$ would maximize the probability of the following result? $$(\text{purple}, \text{blue}, \text{purple}, \text{red})$$ i.e., the first ball is purple, the second ball is blue, the third ball is purple, and last ball is red.
2. Suppose that instead we have $P(n= 6) =\frac{1}{3}$ and $P(n= 7) =\frac{2}{3}$. Given the result in (1), what is the probability that $n= 6$?

For (1): $$\frac{\mathrm{d}}{\mathrm{d}n} \left[ \frac{6}{n+11} \cdot \frac{n}{n+10} \cdot \frac{5}{n+9} \cdot \frac{5}{n+8} \right]=0$$

I got $n\approx 3.13\approx 3$. I'm not sure about (2)

• So have you any thoughts at all? – Graham Kemp Oct 31 '16 at 0:54
• Yes! I added it in the post – MathLearner1 Oct 31 '16 at 1:02

I) Yes, that looks okay. Letting $R$ be the result of $[\color{purple}\bullet\color{blue}\bullet\color{purple}\bullet\color{red}\bullet]$, and $N$ be the count of blue balls, then you have $$\mathsf P(R\mid N=n)=\frac{6\cdot n\cdot 5\cdot 5}{(n+11)(n+10)(n+9)(n+8)}$$
Treating this as a function of $n$ you found the maximum value to be at the lone positive root of the derivative, $n\approx3.1335$ .
II) For this you are given a distribution for $N$; $\mathsf P(N=6)=\tfrac 13, \mathsf P(N=7)=\tfrac 23$
Now, find $\mathsf P(N=6\mid R)$ using Bayes' Rule and the Law of Total Probability.