The (most probable) color of the card in the box

133 Views Asked by At

There are an equal number of red, yellow, green, and blue cards. Take one of them and put it in the box. Suppose that red cards was most selected, followed by yellow, green, and blue when we selected cards outside the box randomly. What is the color of the card in the box?$^1$

This is the problem suggested in the lecture$^2$ yesterday, and I tried to solve the problem by this way:

Formally(?) Edited Problem There are $n$ red cards, $n$ yellow cards, $n$ green cards, and $n$ blue cards. First, take one of them and put it in the box. Second, take any number of cards among the rest and examine their color. After the second step, we found that $n_r \ge n_y \ge n_g \ge n_b$, where $n_r, n_y,n_g,n_b$ is the number of (red, yellow, green, blue) cards taken in second step. What is the most probable color of the card in the box?

Attempted Solution Let $n$ be the number of each red, yellow, green, and blue cards. Let $A$ be the event that red cards are most selected, followed by yellow, green, and blue when we get cards randomly. $R$ the event that the red card is in the box, $Y$ that the yellow card is in the box, $G$ green, and $B$ blue. Then the probability that the color of the card in the box is red, yellow, green, and blue each is $P(R|A)$, $P(Y|A)$, $P(G|A)$, and $P(B|A)$. Now let's find $P(R|A)$. By the law of total probability, $$ P(R|A)=\frac{P(R\cap A)}{P(A)}=\frac{P(A|R)P(R)}{P(A|R)P(R)+P(A|Y)P(Y)+P(A|G)P(G)+P(A|B)P(B)}. $$ When the red card is in the box, there are $n-1$ red card, and $n$ yellow, green, and blue card each outside the box. Then there are $\binom{n+3}{4}$ ways to select red card most, followed by yellow, green, and blue cards among total $n(n+1)^3$ ways; $\binom{n+3}{4}$ is the number of the way of choosing four elements among $0,1,\dots,n-1$ with repitition. Thus, $$ P(A|R)=\frac{\binom{n+3}{4}}{n(n+1)^3}. $$ Now find $P(A|Y)$. When the yellow card is in the box, there are $n-1$ yellow card, and $n$ red, green, and blue card each outside the box. We select either $n$ red cards or less than $n$ red cards. When we select $n$ red cards, there are $\binom{n+2}{3}$ ways, and when we select less than $n$ red cards, there are $\binom{n+3}{4}$ ways among $n(n+1)^3$ ways. Thus, $$ P(A|Y)=\frac{\binom{n+3}{4}+\binom{n+2}{3}}{n(n+1)^3}. $$ In similar way, we can find that $$ P(A|G)=\frac{\binom{n+3}{4}+\binom{n+2}{3}+\binom{n+1}{2}}{n(n+1)^3},\qquad P(A|B)=\frac{\binom{n+3}{4}+\binom{n+2}{3}+\binom{n+1}{2}+\binom{n}{1}}{n(n+1)^3}. $$ Since $P(R)=P(Y)=P(G)=P(B)=\frac{1}{4}$, we get \begin{align} P(R|A)&=\frac{\binom{n+3}{4}}{4\binom{n+3}{4}+3\binom{n+2}{3}+2\binom{n+1}{2}+\binom{n}{1}}\\ P(Y|A)&=\frac{\binom{n+3}{4}+\binom{n+2}{3}}{4\binom{n+3}{4}+3\binom{n+2}{3}+2\binom{n+1}{2}+\binom{n}{1}}\\ P(G|A)&=\frac{\binom{n+3}{4}+\binom{n+2}{3}+\binom{n+1}{2}}{4\binom{n+3}{4}+3\binom{n+2}{3}+2\binom{n+1}{2}+\binom{n}{1}}\\ P(B|A)&=\frac{\binom{n+3}{4}+\binom{n+2}{3}+\binom{n+1}{2}+\binom{n}{1}}{4\binom{n+3}{4}+3\binom{n+2}{3}+2\binom{n+1}{2}+\binom{n}{1}}. \end{align} Since $P(R|A)<P(Y|A)<P(G|A)<P(B|A)$, the most probable color of the card in the box is blue.

My question: Is my attempted solution correct? What is an alternative solution of the problem?


$^1$ I interpreted this question as "Find the most probable color of the card in the box."

$^2$ The lecture is not about math, but math education.

1

There are 1 best solutions below

0
On

With your formal statement of the problem, it is really very simple: the cards don't care in what order the steps happen - each is equally likely to end up picked in any particular single draw. So if you imagined first having picked the $n_i$ cards for $i = r, g, b, y$ (the second step) then what is left in the pile is $n-n_i$ for each colour. So the probability that the card in the box is color $i$ is $$P(i) = \frac{n-n_i}{4n - \sum_i n_i}.$$

You can generalize to any initial numbers in the pile, not necessarily the same for each color: you will get something very similar $$P(i) = {n_{i,0} - n_i\over n_{t}-\sum_i n_i},$$

where $n_t = \sum_i n_{i,0}$ is the total number of cards in the beginning.


EDIT: I was assuming at first that the numbers $n_i$ were actually known, but when looking through your attempted solution, I'm now guessing that what you want is a probability conditional only on the event that $n_r \geq n_y \geq n_g \geq n_b$. I can adapt my argument for that purpose though.

Let's wrap all the information about the values of the $n_i$'s in some variable $N$ (it is an ordered quadruple). Let $\cal N$ be the set of all values of $N$ for which the inequality is true, and consider a particular outcome where the $n_i$'s have values that satisfy it, that is $N \in \cal N$. What I have found above then is $P(i|N)$. We don't need to bother finding $P(N)$, because we can claim from the formula for $P(i|N)$ that for every $N \in \cal N$, $$ P(b|N) \geq P(g|N) \geq P(y|N) \geq P(r|N) $$ and at least for $n \geq 2$, for each of the inequalities above there is at least one case in which it is strict; for example, for the middle one, that would be $(1, 1, 0, 0)$. So now we have $$ P(b\cap N\in{\cal N}) = \sum_{N\in \cal N}P(N)P(b|N) > \sum_{N\in \cal N}P(N)P(g|N) = P(g\cap N\in\cal N) $$ and similarly for the others. Dividing by $P(N\in\cal N)$, which is the same for all of them, we find $P(b|N\in{\cal N}) > P(g|N\in{\cal N}) > P(y|N\in{\cal N}) > P(r|N\in{\cal N})$.