1

We have $n$ numbered boxes from $1$ to $n$. Box $i$ contains $i-1$ red balls and $n-i$ yellow balls. We randomly chose a box and we draw two balls without substitution.

  1. Find the probability that the second ball is yellow.

Let $X_i$ be the event that we pick the box $i$. Thus

$\rightarrow \mathbb{P}(g_2)=\sum_{i=1}^{n}\mathbb{P}(g_2,X_i)=\sum_{i=1}^{n}\mathbb{P}(X_i)\mathbb{P}(g_2|X_i)=\frac{1}{n}\cdot \frac{n-i}{n-1}$

  1. Find the probability that the second ball is yellow if the first is yellow.

$\rightarrow \mathbb{P}[(g_2|g_1)|X_i]=\frac{\mathbb{P}(g_1|X_i)\mathbb{P}[(g_1|g_2)|X_i]}{\mathbb{P}[g_2|X_i]}=\frac{\frac{n-i}{n-1}\cdot \frac{n-i-1}{n-2}}{\frac{n-i}{n-1}}=\frac{n-i-1}{n-2}$

$\Rightarrow \mathbb{P}(g_2|g_1)=\sum_{i=1}^{n}\mathbb{P}(X_i)\mathbb{P}[(g_2|g_1)|X_i]=\frac{n-i-1}{n(n-2)}$

  1. Find the probability to draw the box 1, knowing that the two balls are both yellow.

$\rightarrow \mathbb{P}(X_i|g_1,g_2)=\frac{\mathbb{P}(X_i)\mathbb{P}(g_1|g_2)\mathbb{P}(g_2|X_i)}{\mathbb{P}(g_1,g_2)}$ where

$\mathbb{P}(g_1,g_2)=\sum_{i=1}^{n}\mathbb{P}(g_1,g_2,X_i)=\sum_{i=1}^{n}\mathbb{P}(X_i)\mathbb{P}(g_1,g_2|X_i)=\sum_{i=1}^{n}\mathbb{P}(X_i)\mathbb{P}(g_1|g_2)\mathbb{P}(g_2|X_i)=\frac{1}{n}\sum_{i=1}^{n}\frac{n-i}{n-1}\cdot \frac{n-i-1}{n-2}$

$\Rightarrow \frac{\frac{1}{n}\cdot \frac{n-i}{n-1}\cdot \frac{n-i-1}{n-2}}{\frac{1}{n}\sum_{i=1}^{n}\frac{n-i}{n-1}\cdot \frac{n-i-1}{n-2}}$


Is it correct?

Thanks in advance.

  • 1
    Concerning the first question: can think of any reason why the probability that the second ball is yellow should be larger or smaller than the probability on being red?...If you cannot then draw conclusions on base of symmetry. – drhab Jul 14 '20 at 08:54
  • Just for clarification, are you saying there are total of (n-1) balls in box n? So box 1 has no balls? – Math Lover Jul 14 '20 at 09:16
  • @MathLover You're right. Ok, well, I cannot answer. – Francesco Totti Jul 14 '20 at 09:19
  • Didn't check fully, but your results cannot depend on $i$. – nicola Jul 14 '20 at 09:26
  • @MathLover Guess that there are $n-1$ balls in each box. For each box you have a different composition of yellow and red balls. – nicola Jul 14 '20 at 09:29
  • @nicola I think you're right. – Francesco Totti Jul 14 '20 at 09:31
  • @nicola agree. If n = 1, there are no balls. – Math Lover Jul 14 '20 at 09:34
  • @MathLover Guess the $n>2$ condition is pretty much implicit (even if it should be declared explicitly). They talk about drawing the second ball and you can have a second ball only if $n>2$. – nicola Jul 14 '20 at 09:36
  • @nicola So, how would you fix it? – Francesco Totti Jul 14 '20 at 09:39
  • You have to perform the sums. For instance, in the first point you forgot the summation. Sum over $i$ and see what happens. Consider also the @drhab's comment that answers the first question without calculations. – nicola Jul 14 '20 at 09:43
  • Have a look at this answer. It tells you that the answer on question 2 is $\frac23$. @nicola It might interest you as well. – drhab Jul 14 '20 at 11:01
  • @drhab Yes, of course. If I have to find the probability of 2 consecutive yellows, it will be $\frac{1}{3}$. But once given that the first is yellow, the probability of the 2nd yellow will be $\frac{2}{3}$ as consecutive drawings of yellow increase the probability of us having chosen a box with more yellows. – Math Lover Jul 14 '20 at 14:53
  • @MathLover For 1), like you say, $\mathbb{P}(g_2)=\frac{1}{2}$. For 2) we have $\mathbb{P}(g_2|g_1)=\sum_{i=1}^{n}\mathbb{P}(X_i)\mathbb{P}[(g_2|g_1)|X_i]=\frac{1}{n}\cdot \sum_{i=1}^{n}\frac{n-i-1}{n-2}=\frac{1}{n} \cdot \frac{n(n-3)}{2(n-2)}=\frac{n-3}{2(n-2)}$. For 3), can you explain me how you obtain that result? – Francesco Totti Jul 14 '20 at 14:58
  • @FrancescoTotti $P(92|g1)$ should be $\frac {2}{3}$, independent of the value of n (for n > 2). – Math Lover Jul 14 '20 at 15:12
  • Also for question 3, the probability is $\frac {3}{n}$. I wrote incorrectly earlier. You may want to read Bayes' theorem. – Math Lover Jul 14 '20 at 15:41

1 Answers1

2

Let me take the first problem where we have to find the probability that the 2nd ball is yellow without substitution. Given the distribution of red and yellow balls, the probability of pulling either color should be $\frac{1}{2}$ over n boxes (n > 2).

As the probability of pulling a specific color ball varies from box to box, here is how it will look -

Probability of picking box i $(P_{Bi}) = \frac {1}{n}$

Probability of pulling the first ball as red in box i $= \frac {i-1}{n-1}$
Probability of pulling the first ball as yellow in box i $= \frac {n-i}{n-1}$

Even the probability of the 2nd ball being yellow should be the same as the first ball being yellow. Please see below.

Probability of pulling the second ball as yellow ($P_{Yi}$) $= \frac {i-1}{n-1} .\frac {n-i}{n-2} + \frac {n-i}{n-1} .\frac {n-i-1}{n-2} = \frac {n-i}{n-1}$ ....(A)

$P_Y = \sum_{i=1}^n PBi.PYi = \frac{1}{n}.\sum_{i=1}^n PYi = \frac{1}{n}.\sum_{i=1}^n \frac{n-i}{n-1}$

$P_Y = \frac{1}{n}.\frac{n^2-\frac{n(n+1)}{2}}{n-1} = \frac{1}{2}.$

The reason I wrote equation (A) as the 2nd and 3rd problems are variations of the first and you should get it from (A).

Math Lover
  • 51,819