# Die roll and coin flip

Suppose I roll a 4-sided die, then flip a fair coin a number of times corresponding to the die roll. Given that i got three heads on the coin flip, what is the probability the die score was a 4?

I recognize that Bayes Formula can be used to solve this but I'm a little stuck on how to apply it. I figured that because the coin flip got three heads, it's impossible the die score is 2 or less, so the die score MUST be greater than 2. But I'm not sure if that really applies.

I recognize that Bayes Formula can be used to solve this but I'm a little stuck on how to apply it. I figured that because the coin flip got three heads, it's impossible the die score MUST be greater than 2. But I'm not sure if that really applies.

Right, given that you have three heads, you must have rolled 3 or 4 on the die, and flipped the coin so many times. Letting $X$ denote the die result and $Y$ count the heads.

$\mathsf P(X=4\mid Y=3) ~{~=~ \dfrac{\mathsf P(Y=3\mid X=4)\mathsf P(X=4)}{\mathsf P(Y=3\mid X=3)\mathsf P(X=3)+\mathsf P(Y=3\mid X=4)\mathsf P(X=4)}\\~=~ \dfrac{4\cdot 2^{-4}}{2^{-3}+4\cdot 2^{-4}}\\~=~\dfrac 23}$

• If that's the probability of the die score being a 3, wouldn't that mean that the odds of it being a 4 is 2/3? – Ryan Goulden Oct 12 '17 at 15:29
• Why is it that this answer differs from the one above? – Ryan Goulden Oct 12 '17 at 15:41
• @RyanGoulden The other answer has now been corrected. – Graham Kemp Oct 12 '17 at 16:05

Rather than using Bayes formula right away, it might be better to understand exactly what's going on and go case-by-case, then go back and reconcile your logic with Bayes formula.

So what are your possibilities for flipping $3$ heads? obviously you need to roll a $3$ or a $4$ on the die.

In the case of a $3$ being rolled, there is one way out of $2^3$ possibilities to flip $3$ heads. These possibilities are doubly as likely as the possibilities in the case of rolling a $4$.

In the case of a $4$, there are $4$ ways out of $2^4$ to flip $3$ heads.

Thus, the probability that you have rolled a $4$ given you have flipped $3$ heads is $\frac4{4+2}$.

Bayes Rule actually wouldn't work too well for this problem, because calculating the probability of flipping $3$ heads is more complicated to calculate than just doing what I did.

• Yes, I agree. I was trying to find a way to use it, and I kept coming around to having trouble calculating the probability in the terms. I assumed there must have been a better way for a seemingly simple problem. – Ryan Goulden Oct 12 '17 at 15:24
• The possibilities for 3 are twice more likely than the ones for 4. So, the answer should be $4/(4+2)=2/3$ – clark Oct 12 '17 at 15:59
• @clark thanks for pointing that out :) – Austin Weaver Oct 12 '17 at 16:04
• Okay, that makes a lot of sense. Thanks guys! – Ryan Goulden Oct 12 '17 at 16:08
• Actually, can someone explain why it is doubly as likely?? – Ryan Goulden Oct 12 '17 at 17:36