I have no idea what problem you think you're solving, but it's not the one I posed. I never said a specific coin was heads, I just said at least one of them was heads.
Given that I make money on these sorts of questions (doing it for real in a semi-military context where it's important to be right, and you get tested against reality) I feel pretty confident that I know what I'm talking about. You're clearly talking about something completely different, and I really don't understand what you're saying.
Look, don't take this the wrong way ... probabilities are easy to get wrong ... I'm only having this conversation with you because my math skills are rusty.
> I never said a specific coin was heads
OK, so let's make it mathematically correct (let's say we're painting them) ... making an effort here :)
P( blue_head AND red_head | blue_head OR red_head)
P(blue_head OR red_head) = 1
you said that you're retrying until this happens
normally this would be 3/4
Making the problem ...
P( blue AND red | blue OR red)
= P( blue OR red | blue AND red ) * P( blue AND red ) / P(blue OR red)
(applied bayes)
= 1 * P(blue) * P(red) / 1
This is supposed to be the probability without conditionals, in which case P(BH or RH) = 3/4. Using the Bayesian formula is what is taking into account the fact that at least one head has shown.
That's probably a typo, because you probably know that P(BH)=1/2.
Your third error is here:
1/4 * 1/4 = 1/2
1/4 * 1/4 = 1/16
Even if you correct this to the 1/2 * 1/2 that you intended, you now get that P(BH and RH)=1/4. Surely you realise that this must be wrong. I've already told you that there's at least one head, so you can't get the same answer as when I've given you no information.
Here's the correct Bayesian sum:
P(RH and BH | RH or BH)
= P(RH and BH and (RH or BH)) / P(RH or BH)
= P(RH and BH) / (3/4)
= P(RH) * P(BH) / (3/4)
= 1/2 * 1/2 / (3/4)
= 1/4 / (3/4)
= 1/3
The fact that I'm using the conditional probability is what uses the information I've given you, so you can't use that again and claim P(RH or BH)=1.
Show me the error.
Here, do an experiment. Toss two coins of different denominations. Consider those cases where there's at least one head. How often are they both heads? Are you a programmer? Run the simulation - show me the code.
Here, let me help:
#!/usr/bin/python
import random
def toss():
if random.random() <= 0.5:
return 'Head'
return 'tail'
trials = 0
two_heads = 0
for trial in xrange(10000):
coin0 = toss()
coin1 = toss()
if coin0 != 'Head' and coin1 != 'Head':
continue
trials += 1
if coin0 == 'Head' and coin1 == 'Head':
two_heads += 1
print trials,float(two_heads)/trials
Don't take this the wrong way ... probabilities are easy to get wrong ... I'm only having the conversation with you because you're getting it completely wrong, and yet you appear to want to learn.
You say:
P(blue_head OR red_head) = 1
you said that you're retrying until this happens
normally this would be 3/4
This is an incorrect application of Bayes' Theorem. The whole point of taking P(X|Y) isn't that P(Y) can be then taken as being 1. P(Y) remains the probability of Y. The point is that when we then only consider those events where Y occurs, then we have conditioned our probabilities, and the formula gives us what we want. Specifically, relative to Y, the probability of X changes.
Using "BH" for "Blue coin shows Head" and "RH" for "Red coin shows Head" we have:
P(BH and RH | BH or RH)
= P(BH and RH and (BH or RH)) / P(BH or RH)
= P(BH and RH) / P(BH or RH)
= 0.25 / 0.75
= 1/3
You then go on to say:
P(BH OR RH) = P(BH) + P(RH) - P(BH) * P(RH) = 1
Taking just the second part of this:
P(BH) + P(RH) - P(BH) * P(RH) = 1
and adding P(BH) * P(RH) to both sides we get:
P(BH) + P(RH) = 1 + P(BH) * P(RH)
Since by symmetry P(RH)=P(BH), and letting x=P(BH)=P(RH) this simplifies to
x + x = 1 + x^2
The only solution to that is x=1, so P(BH)=P(RH)=1
Your math is clearly screwed at this point.
So I've given you the correct interpretation, I've shown you where your calculations are wrong, and I've explained your incorrect use of Bayes' Formula.
It's pretty clear I won't convince you.
Let me leave you with these questions:
If I toss two coins until at least one shows a Head, what's the probability that both are Heads?
If I roll two dice until at least one shows a 6, what's the probability that both are 6's?
If I spin two roulette wheels until at least one shows a Red-23, what's the probability that both are red?
Are you sure?