1
$\begingroup$

I can't understand how I can implement the Bayes' Rule here and the probability of getting two heads when tossing twice. Could anyone give me a hint?

Suppose you have two coins. One coin has probability 0.7 of coming up heads, and the other has probability 0.4 of coming up heads. You are playing a gambling game with a friend, and you draw one of those two coins at random from a bag.

Before you start the game, your prior belief is that the probability of choosing the 0.7 coin is 0.5. This is reasonable, because both coins were equally likely to be drawn. In this game, you win if the coin comes up heads.

Suppose the game starts, you have tossed twice, and have obtained two heads. Then what is your new belief about p, the probability that you are using the 0.7 coin?

$\endgroup$
  • $\begingroup$ 1. In your first sentence, do you mean "heads" where you say "coins"? 2. This reads like a textbook question. Is this a question for some class? $\endgroup$ – Glen_b Jun 26 at 2:09
  • $\begingroup$ Thank you, we have already worked it through. No, it’s just an accumulation of my misunderstanding with random numbers. $\endgroup$ – Maria Lavrovskaya Jun 26 at 4:30
  • 1
    $\begingroup$ Your question is still confusing in the first sentence where you have "coins" when it seems you should be saying "heads". Please edit. $\endgroup$ – Glen_b Jun 26 at 4:50
  • $\begingroup$ Good point. Have edited it accordingly. $\endgroup$ – Maria Lavrovskaya Jun 26 at 4:51
2
$\begingroup$

I am a hardcore frequentist but we gotta know the enemy, so let's give it a try.

  • Let $A$ be the event "we are using the 0.7 coin"
  • Let $B$ be the event "we got two heads in a row"

According to the Bayes Theorem, $P(A|B)=\frac{P(B|A)P(A)}{P(B)}$

  • $P(A)=1/2$
  • $P(B|A)=0.7^2$
  • $P(B) = \frac{0.7^2+0.4^2}{2}$

We can easily do the computation for $P(A|B)$

$\endgroup$
  • $\begingroup$ I can't get how we compute P (B given A) since our prior belief is 0.5. Could you guide me throw, please? $\endgroup$ – Maria Lavrovskaya Jun 25 at 10:14
  • $\begingroup$ If $A$ (we are using the 0.7 coin) is true, then the probability of $B$ (getting those two heads) is $0.7^2$ $\endgroup$ – David Jun 25 at 10:15
0
$\begingroup$

Let $C_1$ be the coin with $0.7$ head probability and $C_2$ be the other one. Priors are $P(C_i)=0.5$. The event occurred is $2$ Heads, call it $E$. We ask for $P(C_1|E)$. $$P(C_1|E)=\frac{P(E|C_1)P(C_1)}{P(E)}$$ $P(E|C_1)=(0.7)^2$ and we have $P(C_1)$. From total probability law, we can also find $P(E)$: $$P(E)=P(E|C_1)P(C_1)+P(E|C_2)P(C_2)=\frac{P(E|C_1)+P(E|C_2)}{2}$$ where $P(E|C_2)=(0.4)^2$.

$\endgroup$
  • $\begingroup$ How do you get P (E given C1) to be equal to 0.7^2? $\endgroup$ – Maria Lavrovskaya Jun 25 at 10:12
  • $\begingroup$ $P(E|C_1)$ means the probability of two heads (i.e. HH) when know we use coin 1. $\endgroup$ – gunes Jun 25 at 10:14
  • $\begingroup$ Then I can't understand why do we need prior here. $\endgroup$ – Maria Lavrovskaya Jun 25 at 10:15
  • $\begingroup$ You need the prior when substituting $P(C_1)$ and $P(C_2)$ $\endgroup$ – gunes Jun 25 at 10:15
  • $\begingroup$ Then we get as for numerator: 0.7^2* 0.5, don't we? $\endgroup$ – Maria Lavrovskaya Jun 25 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.