0
$\begingroup$

I have two dices. One has 6 sides and one have 8 sides.

I select which one to roll based on a flip of a fair coin.

A dice it's selected based on whether the flip of this coin. If it's head, the 6-sided dice it's rolled, 8-sided otherwise.

What's the probability of that coin flip was heads given the roll was 5?

I'm trying to solve using bayes rule here.

I think it'll be:

P(HEADS|5) = [P(5|HEADS)*P(HEADS)] / P(5)

I'm trying with:

P(5|HEADS) = 1/6
P(HEADS) = 1/2
P(5) = 2/14

Which results in: 0.58356676

But it's not the correct answer.

I think I'm confusing the value that it's supposed to be in P(5|HEADS).

$\endgroup$
  • $\begingroup$ Given roll was 5 what is the meaning of this statement? $\endgroup$ – Kanwaljit Singh Jan 6 '17 at 11:01
  • $\begingroup$ which of the dice do you use if you get a head? $\endgroup$ – Cato Jan 6 '17 at 11:02
  • $\begingroup$ @KanwaljitSingh the entire question is: What's the probability of that coin flip was heads given the roll was 5? $\endgroup$ – Cleyton Jan 6 '17 at 11:04
  • $\begingroup$ Yes if your meaning from that statement is 5 on dice. Then both dice have 5 on them so which dice? $\endgroup$ – Kanwaljit Singh Jan 6 '17 at 11:04
  • $\begingroup$ @Cato Thats the beauty, I don't know. I just know the roll was 5. $\endgroup$ – Cleyton Jan 6 '17 at 11:05
1
$\begingroup$

P(HEADS|5) = [P(5 AND Heads)] / P(5)

P(5 and heads) = (1/2)(1/6) = 1/12

P(5) = 1/2 (1/6 + 1/8) = 7/48

(1 / 12) / (7 / 48) = 4 / 7


since you say that we don't know how a head influences the dice choice, I think it is

P(HEADS|5) = [P(5 AND Heads)] / P(5)

P(5) = 1/2 (1/6 + 1/8) = 7/48

P(HEADS AND 5) = (1/2) P(5) = 7 / 96

P(HEADS|5) = (7/96) / (7/48) = 1/2


note P(5) = P(use 8 sided) x (1/8) + P(use 6 sided) x (1/6) = (1/2) (1/8) + (1/2)(1/6) = 7 / 48

$\endgroup$
  • $\begingroup$ Your answer matches, but I got confused. Why p(5) was calculated that way? P(5) as an independent is not supposed to be: P(5) = 2/14 ? $\endgroup$ – Cleyton Jan 6 '17 at 11:10
  • $\begingroup$ I was assuming that if you toss a head, then you use the 6 sided die - is that correct? If we don't know what the dice toss does, then it doesn't factor in the answer $\endgroup$ – Cato Jan 6 '17 at 11:15
  • $\begingroup$ I'm sorry, but the coin flip influences. I select which one to roll based on a flip of a fair coin. If heads I get the 6 sided dice, if tails the other. I'll edit. the question $\endgroup$ – Cleyton Jan 6 '17 at 11:16
  • $\begingroup$ @cleyton, in that case it is the first answer - i showed how i calculated P(5) $\endgroup$ – Cato Jan 6 '17 at 11:19
  • $\begingroup$ Another point. I was wondering the correct formula was: P(5|HEADS)*P(HEADS). Why did you rewrite for [P(5 AND Heads)] ? $\endgroup$ – Cleyton Jan 6 '17 at 11:23
1
$\begingroup$

E1 coin shows head.

E2 coin shows tail.

P(E1) = $\frac12$

P(E2) = $\frac12$

A : Dice shows 5.

P(A/E1) = $\frac16$

P(A/E2) = $\frac18$

By Bayes Theorem,

$P(E1/A) = \frac{\text{P(E1)P(A/E1)}}{\text{P(E1)P(A/E1) + P(E2)P(A/E2)}}$

Put values to get the answer.

$\endgroup$
1
$\begingroup$

It is important to know whether ${\tt H}$ chooses the 6-sided or 8-sided dice. $$\begin{cases} \Pr(5|{\tt H})=\frac{1}{6}\\ \Pr(5|{\tt T})=\frac{1}{8} \end{cases}$$ in the former case, and $$\begin{cases} \Pr(5|{\tt H})=\frac{1}{8}\\ \Pr(5|{\tt T})=\frac{1}{6} \end{cases}$$ in the latter.

From the Bayes rule:

$$\Pr({\tt H}|5)=\frac{\Pr(5|{\tt H}) \ \Pr({\tt H})}{\Pr(5)}$$ The law of total probability is used to find $\Pr(5)$: $$\Pr(5)=\Pr(5|{\tt H})\ \Pr({\tt H})+\Pr(5|{\tt T})\ \Pr({\tt T})$$ which in either case is equal to $$\left(\frac{1}{6}\right)\left(\frac{1}{2}\right)+\left(\frac{1}{8}\right)\left(\frac{1}{2}\right)=\frac{7}{48}$$ So depending on the assignment we have $$\Pr({\tt H}|5)=\begin{cases} \frac{1/6\times1/2}{7/48}\\ \frac{1/8\times1/2}{7/48} \end{cases}$$

$\endgroup$

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.