Bayes Theorem: coin flips and posterior predictive distribution

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 5K views
Master1022
Messages
590
Reaction score
116
Homework Statement
A bag has three coins in it which are visually indistinguishable, but when flipped, one coin has a 10% chance of coming up heads, another as a 30% chance of coming up heads, and the last has 60% chance of coming up heads. I randomly draw a coin from the bag and flip it, and the result comes up heads. What is the probability that if I reflip this coin, it will come up heads again? Why?
Relevant Equations
Bayes Theorem
Hi,

I was attempting the following question and just wanted to check whether my working was correct:

Question: A bag has three coins in it which are visually indistinguishable, but when flipped, one coin has a 10% chance of coming up heads, another as a 30% chance of coming up heads, and the last has 60% chance of coming up heads. I randomly draw a coin from the bag and flip it, and the result comes up heads. What is the probability that if I reflip this coin, it will come up heads again? Why?

Attempt:
Let us denote the coins A, B, and C with probabilities of getting a head as follows: ##p(H|A) = 0.1##, ##p(H|B) = 0.3##, and ##p(H|C) = 0##. Each coin is equally likely to be chosen: ##p(A) = p(B) = p(C) = \frac{1}{3} ##.

Thus, we can find:
$$ p(A|H) = \frac{p(H|A) p(A)}{p(H|A) p(A) + p(H|B) p(B) + p(H|C) p(C)} = \frac{0.1 \cdot \frac{1}{3}}{0.1 \cdot \frac{1}{3} + 0.3 \cdot \frac{1}{3} + 0.6 \cdot \frac{1}{3}} = 0.1 $$
$$ p(B|H) = \frac{p(H|B) p(B)}{p(H|A) p(A) + p(H|B) p(B) + p(H|C) p(C)} = \frac{0.3 \cdot \frac{1}{3}}{0.1 \cdot \frac{1}{3} + 0.3 \cdot \frac{1}{3} + 0.6 \cdot \frac{1}{3}} = 0.3 $$
$$ p(C|H) = \frac{p(H|C) p(C)}{p(H|A) p(A) + p(H|B) p(B) + p(H|C) p(C)} = \frac{0.6 \cdot \frac{1}{3}}{0.1 \cdot \frac{1}{3} + 0.3 \cdot \frac{1}{3} + 0.6 \cdot \frac{1}{3}} = 0.6 $$

So now we can find posterior probability:
$$ p(H|H) = p(H|A)p(A|H) + p(H|B)p(B|H) + p(H|C)p(C|H) = (0.1)^2 + (0.3)^2 + (0.6)^2 = 0.46 $$

Does this look correct?
 
Reply
  • Like
Likes   Reactions: PeroK
Physics news on Phys.org
I know I always have alternatives, but using a probability tree is a really simple and neat way of doing these problems. Especially if they get more complicated, with more than one factor. In this case we would have:

C1 (1/3) - C1 Heads (1/3 * 1/10 = 1/30) - C1 Heads-Heads (1/300)

C2 (1/3) - C2 Heads (1/3 * 3/10 = 1/10) - C2 Heads-Heads (3/100)

C3 (1/3) - C3 Heads (1/3 * 6/10 = 1/5) - C3 Heads-Heads (12/100)

Heads on first toss (total) = 1/30 + 1/10 + 1/5 = 1/3; Heads on second toss = 46/300

Probability two-heads given first toss is a head = (46/300)/(1/3) = 46/100.
 
Reply
  • Informative
Likes   Reactions: Master1022
PeroK said:
I know I always have alternatives, but using a probability tree is a really simple and neat way of doing these problems. Especially if they get more complicated, with more than one factor. In this case we would have:

C1 (1/3) - C1 Heads (1/3 * 1/10 = 1/30) - C1 Heads-Heads (1/300)

C2 (1/3) - C2 Heads (1/3 * 3/10 = 1/10) - C2 Heads-Heads (3/100)

C3 (1/3) - C3 Heads (1/3 * 6/10 = 1/5) - C3 Heads-Heads (12/100)

Heads on first toss (total) = 1/30 + 1/10 + 1/5 = 1/3; Heads on second toss = 46/300

Probability two-heads given first toss is a head = (46/300)/(1/3) = 46/100.
Thanks @PeroK ! Always great to see other ways to approach a problem; I tend to overcomplicate things. As they say, all roads lead to Rome (however, I guess there are some wrong roads in probability :) ).
 
Master1022 said:
Thanks @PeroK ! Always great to see other ways to approach a problem; I tend to overcomplicate things. As they say, all roads lead to Rome (however, I guess there are some wrong roads in probability :) ).
Just to illustrate the point. Suppose we change the problem so that the three coins are in the proportions ##a_1, a_2, a_3##. You can see immediately how to update the tree structure - and it would only take a few seconds to get the new answer. Whereas, with the raw Bayes Theorem you'd have a bit of work to do.
 
Reply
  • Like
Likes   Reactions: Master1022