Probability can be hard

On Probably Overthinking It, Allen Downey poses the following probability question:

Suppose I have a six-sided die that is red on 2 sides and blue on 4 sides, and another die that’s the other way around, red on 4 sides and blue on 2.

I choose a die at random and roll it, and I tell you it came up red. What is the probability that I rolled the second die (red on 4 sides)?  And if I do it again, what’s the probability that I get red again?

He provides links to a Jupyter notebook with his answer, but I’m going to write my answer here before I read the notebook.

The first part of the problem is a pretty straightforward Bayes’ rule/signal detection theory. Denote the four-blue-sides die B, the four-red-sides die R, and the observation of a red side red. Then we have:

    \begin{align*}\Pr(red|R) &= 2/3\\\Pr(red|B) &= 1/3\end{align*}

Assuming that by “choose a die at random” we mean that \Pr(R) = \Pr(B) = 1/2, then we can plug these into Bayes’ rule to get:

    \begin{align*} \Pr(R|red) &= \frac{\Pr(red|R)\Pr(R)}{\Pr(red|R)\Pr(R) + \Pr(red|B)\Pr(B)}\\ &= \frac{\frac{2}{3}\times\frac{1}{2}}{\frac{2}{3}\times\frac{1}{2} + \frac{1}{3}\times\frac{1}{2}}\\ &= \frac{\frac{1}{3}}{\frac{1}{3} + \frac{1}{6}}\\ &= \frac{2}{3} \end{align*}

Note that this implies that \Pr(B|red) = 1/3.

It’s maybe a bit trickier to figure out the next part, but, unless I’m mistaken, it’s not all that tricky:

    \begin{align*} \Pr(red|red) &= \Pr(red|R)\pr(R|red) + \Pr(red|B)\Pr(B|red)\\ &= \frac{2}{3}\times\frac{2}{3} + \frac{1}{3}\times\frac{1}{3}\\ &= \frac{4}{9} + \frac{1}{9}\\ &= \frac{5}{9} \end{align*}

Of course, you’ll have to take my word for it that I haven’t yet looked at Downey’s notebook. I don’t know if my answer agrees with his or not, but I can’t think of any reason why the equations above are wrong.

I’m going to publish this post to put it on the record, then read the notebook, and report back as needed.

Addendum: Well, I maybe misread the problem. In Downey’s “Scenario A”, by “do it again” he means “pick a die at random and roll it.” In his “Scenario B”, he means what I originally interpreted it to mean, namely “take the die that produced red the first time and roll it a second time.”

I’m happy to see that his simulations and my analytic solution agree when the word problem is interpreted the same.

It seems to me that part of what makes probability hard, when it is hard, is translating ambiguous words into unambiguous mathematical statements.

This entry was posted in mildly informative filler, probabiity. Bookmark the permalink.

Comments are closed.