# Two questions involving Bayes Theorem

You draw two balls from one of three possible large urns, labelled A, B, and C. Urn A has 1/2 blue balls, 1/3 green balls, and 1/6 red balls. Urn B has 1/6 blue balls, 1/2 green balls, and 1/3 red balls. Urn C has 1/3 blue balls, 1/6 green balls, and 1/2 red balls. With no prior information about which urn your are drawing from, you draw one red ball and one blue ball. What is the probability that you drew from urn C?

So I know Bayes Theorum is this: On a high level, could I take the probability of drawing one red ball and one blue ball from Urn C and divide that by the total probabality of drawing one blue ball and one red ball from all the urns summed up?

The numerator would be $\frac{1}{2} * \frac{1}{3}$ right? The denominator would the the probabilities of drawing a blue and red from all the urns summed up right?

In the NFL, a professional American football league, there are 32 teams, of which 12 make the playoffs. In a typical season, 20 teams (the ones that don’t make the playoffs) play 16 games, 4 teams play 17 games, 6 teams play 18 games, and 2 teams play 19 games. At the beginning of each game, a coin is flipped to determine who gets the football first. You are told that an unknown team won ten of its coin flips last season. Given this information, what is the posterior probability that the team did not make the playoffs (i.e. played 16 games)?

I have no idea how to approach this one. Can someone shed some insight?

• Please check stats.stackexchange.com/tags/self-study/info and edit your question accordingly to homework-like questions policy we have.
– Tim
May 30, 2017 at 7:31
• I added some more work. I'm genuinely stuck on the second. May 30, 2017 at 14:53

Below are two methods. The first uses Bayes' Theorem in full, and the second is a quicker approach (just for fun). Importantly, the two results agree! (They also do not agree with the earlier answer posted by zen...)

$X := \text{Picked Red and Blue}$, $A := \text{Picked Urn A}$, $B := \text{Picked Urn B}$, $C := \text{Picked Urn C}$.

Method 1.

Using Bayes' Theorem, we now compute as follows:

$$\frac{P(X|C)P(C)}{P(X|C)P(C) + [P(X|A)P(A) + P(X|B)P(B)]}$$

where the bracketed portion in the denominator corresponds to the cases in which red and blue were selected but did not come from Urn C.

Under the assumption that each of $P(C)$, $P(A)$, and $P(B)$ is $1/3$, we can cancel this factor from the numerator and denominator to get:

$$\frac{P(X|C)}{P(X|C) + [P(X|A) + P(X|B)]}$$

Next, we calculate each of these terms:

$P(X|C) = 2(3/6)(2/5) = 12/30$;

$P(X|B) = 2(2/6)(1/5) = 4/30$; and

$P(X|A) = 2(1/6)(3/5) = 6/30$.

And so the earlier expression becomes:

$$\frac{12/30}{12/30 + 4/30 + 6/30} = \frac{12}{12+4+6} = \frac{6}{6+2+3} = \frac{6}{11}$$

Method 2.

Without loss of generality, let us suppose each of the urns contains exactly six M&Ms. Then, the number of ways to choose a red and blue M&M from the urns can be computed as follows.

Urn A: BBBGGR; so, picking RB can be done in $1 \cdot 3 = 3$ ways.

Urn B: GGGRRB; so, picking RB can be done in $2 \cdot 1 = 2$ ways.

Urn C: RRRBBG; so, picking RB can be done in $3 \cdot 2 = 6$ ways.

So the probability of it being Urn C given that RB were selected is just:

$$\frac{6}{6+3+2} = \frac{6}{11}$$

as in Method 1.

• It was not clear to me that the statement "having no prior information about which urn you are drawing from". I read it as the prior probabilities for P(A), P(B) and P(C) were unknown and not they were equal. That would make the problem unsolvable. If you take it to mean prior to drawing the ball the choice of urn is equally likely, in which case P(C|X) can be determined. Jun 1, 2017 at 14:41
• How do you get $P(X|c)=2(3/6)(2/5)$? shouldn't it be $P(X|c)=2(3/6)(2/6)$ ? It is not given that there are 6 balls in the urns right? why then say that the chance of getting a blue is now $(2/5)$ instead of $(2/6)$?
– zen
Jun 6, 2017 at 15:55
• For example try to calculate the chance of picking (blue ,blue ,blue ,blue,blue,blue,blue) from urn C by either of your methods. I think you implicilty assume there are 6 balls.
– zen
Jun 6, 2017 at 16:25

First, lets let $$H$$ be the event that the team did not make the playoffs and $$E$$ be the event that the team won 10 coin flips in the season. So we want to know $$P(H|E)$$ which is equal to $$\frac{P(E|H)P(H)}{P(E|H)P(H) + P(E|\neg H)P(\neg H)}$$.

We know that $$P(H) = 20/32$$ and $$P(\neg H) = 12/32$$. Furthermore, $$P(E|H) = \binom{16}{10}(0.5)^{16}$$ since knowing $$H$$ means we know the team only played 16 games, and out of 16 flips there are 10 successes.

Next, we need to tackle $$P(E|\neg H)$$. Let $$A$$ be the event that the team played 17 games, let $$B$$ be the event that the team played 18 games, and let $$C$$ be the event that the team played 19 games. Then by the law of total conditional probability, we have $$P(E|\neg H) = P(E|A, \neg H)P(A|\neg H) + P(E|B, \neg H)P(B|\neg H) + P(E|C, \neg H)P(C|\neg H).$$ Since $$\neg H$$ is the event of making the playoffs, we know that $$P(A|\neg H) = 4/12$$, $$P(B|\neg H) = 6/12$$, and $$P(C|\neg H) = 2/12$$. Also, $$P(E|A, \neg H) = \binom{17}{10}(0.5)^{17}$$, $$P(E|B, \neg H) = \binom{18}{10}(0.5)^{18}$$, and $$P(E|C, \neg H) = \binom{19}{10}(0.5)^{19}$$, using the same logic as for $$P(E|H)$$.

So, our final answer is $$P(H|E) = \frac{\binom{16}{10}(0.5)^{16} \frac{20}{32}}{\binom{16}{10}(0.5)^{16} \frac{20}{32} + \left(\binom{17}{10}(0.5)^{17}(\frac{4}{12}) + \binom{18}{10}(0.5)^{18}(\frac{6}{12}) + \binom{19}{10}(0.5)^{19}(\frac{2}{12})\right) \frac{12}{32}}$$$$\approx 0.556.$$

• Welcome djr! Nicely structured and thorough answer, but somewhat incorrect. You assumed that the probabilities for A, B, C all are equal to 12/32 - how is this possible? You can repare this by using the probabilities given in the problem directly, and not considering ¬H, so P(A)=4/32, P(B)=6/32, P(C)=2/32. Only condition E on A, B, or C, not on ¬H.
– Ute
Jul 13 at 14:08
• Thank you Ute! If I'm understanding the law of total expectation correctly though, I think my answer would be correct if I corrected $P(A|\neg H) = 4/12$, $P(B|\neg H) = 6/12$ and $P(C|\neg H) = 2/12$. Do you agree? I didn't assume that the probabilities for $A$, $B$, and $C$ are equal to 12/32, I just substituted in for $P(\neg H)$.
– djr
Jul 13 at 17:29
• Yes, these are the conditional probabilities, and you would need to multiply with 12/32 afterwards. It is an extra conditioning step, that could be avoided, because H, A, B and C are mutually disjoint events, and their probabilities add to 1. But if you are more comfortable with conditional probabilities than with a Bayes formula with more than two events in the denominator, just stick to your old plan :-)
– Ute
Jul 13 at 17:39
• Great, thank you for the clarification!
– djr
Jul 13 at 17:44
• Looks good now (+1) :-)
– Ute
Jul 13 at 18:26

So I'll give two answers one for each question. Let's first discuss the first question and then in a separate answer I will attempt to answer the second question(this might take a while because I have some other things to do :)). So first lets expand bayes theorem and then we will consider what this means. So want $P(drew from C|red, blue)=\frac{P(red ,blue|drew from C)P(drew from C)}{P(red ,blue|drew from C)P(drew from C)+ P(red ,blue|drew from A)P(drew from A)+P(red ,blue|drew from B)P(drew from B)}$

Technically we do not know $P(drew from A),P(drew from B),P(drew from C)$! So technically we cannot calculate this chance. But we can make a reasonable assumption and that is that $P(drew from A)=P(drew from B)=P(drew from C)=\frac{1}{3}$. Now to determien all the other terms lets start with $P(red ,blue|drew from C)$ now we assume these are independent chances e.g. If I pick blue first the chance of blue stays the same for the second choice (which would in real life not be true) than the chance of $P(red ,blue|drew from C)=(\frac{1}{3} \frac{1}{2}+\frac{1}{2} \frac{1}{3})=\frac{1}{3}$ remember that not only red, blue counts but also blue ,red thus we should count both possibilities. the other probabilities can be calculated in a similar way. so that $P(drew from C|red, blue)=\frac{\frac{1}{3}\frac{1}{3}}{\frac{1}{3}\frac{1}{3}+ 2\frac{1}{2}\frac{1}{6}\frac{1}{3}+2\frac{1}{3}\frac{1}{6}\frac{1}{3}}=0.428$ (approximately)

So for the second question I will just offer some help in the form of tips after which I hope you will understand it. tip 1: consider all teams equal so and calculate the chance that $P(played 16 games)=\frac{20}{32}$. 2. then see that the concitional probability your looking for is $P(played 16 games|coin wins =10)$ 3. $P(coin wins =10 |played 16 games)$ is binomially distributed with (n=16,p=0.5) and X=10 ( or k=10 in wiki notation).