Bayes Theorem to find probability of getting a sum given a coin toss

322 Views Asked by At

Suppose you flip a fair coin, and if the result is heads you will roll a pair of fair dice, and if the result is tails you will roll the biased dice. Using Bayes’ Theorem:

  • a. derive the probability that you flipped heads given that the sum of pips on the dice you rolled is 12.

The probability of getting a sum of 12 is 1/36. The probability of the sum of pips equaling 7 is 6/36. Am I right to calculate it this way? H = Getting head, S = Getting the sum of 12

  • P(H|S) = (P(S|H) P(H)) / P(H).
  • P(S|H) = P(H n S) / P(H) = (0.5 X 0.278) /0.5 = 0.0278

Am I right? I feel like I did P(S|H) wrong. Any guidance would be greatly appreciated

2

There are 2 best solutions below

3
On BEST ANSWER

This is not correct.

Let $S_7$ denote obtaining a sum of $7$, $S_{12}$ denote obtaining a sum of $12$, and $H$ denote obtaining heads.

Note that what you have is saying that $$\mathsf P(H\mid S_{12})=\mathsf P(S_{12}\mid H)$$

Instead we have

$$\mathsf P(H\mid S_{12})=\frac{\mathsf P(H\cap S_{12})}{\mathsf P(S_{12})}=\frac{\mathsf P(S_{12}\mid H)\cdot \mathsf P(H)}{\mathsf P(S_{12})}$$

Hence we have

$$\begin{align*} \mathsf P(H\mid S_{12}) &=\frac{\mathsf P(S_{12}\mid H)\cdot \mathsf P(H)}{\mathsf P(S_{12})}\\\\ &=\frac{\frac{1}{2}\cdot\left(\frac{1}{6}\right)^2}{\frac{1}{2}\left(0.05^2+\left(\frac{1}{6}\right)^2\right)}\\\\ &\approx 0.917 \end{align*}$$

and similarly for finding $\mathsf P(H\mid S_7)$

2
On

First of all, you've got the formula for P(H|S) wrong.

Notice that Bayes' theorem states that P(A|B) = P(B|A)(P(A)) / P(B).

Hence, in your case, P(H|S) = (P(S|H) P(H)) / P(S)

That being said, the correct answer would be as such:

P(H|S) = (P(S|H) P(H)) / P(S)

Lets find P(S|H):

Knowing that the coin tossed appeared as Head, the pair of dice to be tossed will be fair.

Hence the probability of getting a sum of 12 would be $\frac{1}{36}$

Now, lets find P(S):

P(S) = P(S $\cap$ H) + P(S $\cap$ T) , where T denotes the event of tossing tails.

P(S $\cap$ H) = $\frac{1}{2}$ x $\frac{1}{36}$ = $\frac{1}{72}$

P(S $\cap$ T) = $\frac{1}{2}$ x $\frac{1}{20}$ x $\frac{1}{20}$ = $\frac{1}{800}$

$\implies$ P(S) = $\frac{1}{72}$+ $\frac{1}{800}$ = $\frac{109}{7200}$

Thus, P(H|S) = $\frac{(\frac{1}{36}) (\frac{1}{2})}{\frac{109}{7200}}$ = $\frac{100}{109}$