1
$\begingroup$

Learning Bayes statistics from Allen Downey's Think Bayes

There are three dice, 6-sided, 8-sided and 12-sided. A randomly chosen dice is rolled and the outcome is "1". What's the probability it was the 6-sided dice?

Is it correct to setup the sample space made of 26 outcomes like so?

outcomes from 6-sided dice: [ 1 2 3 4 5 6
outcomes from 8-sided dice:   1 2 3 4 5 6 7 8
outcomes from 12-sided dice:   1 2 3 4 5 6 7 8 9 10 11 12 ]

Or is it just [1 2 3 4 5 6 7 8 9 10 11 12 ] ?

The prior is 1/3, the likelihood P(rolled-1|6-sided) is 1/6, but what is probability of evidence P(rolled-1)? Is it 3/26? Or 1/12?

I'm not getting the correct result using either.

================================

Based on Sextus Empiricus' answer https://stats.stackexchange.com/a/650221/313507, here's the sample space: enter image description here

And here are the probabilities of each outcome: enter image description here

The solution of the exercise is, using Bayes formula, $$ P(6-sided|rolled-1) = \frac{P(6-sided)*P(rolled-1|6-sided)}{P(rolled-1)} $$ $$ P(6-sided|rolled-1) = \frac{\frac{1}{3}\cdot\frac{1}{6}}{\frac{1}{8}}=\frac{4}{9} $$

The 1/8 probability of rolling one can be obtained by summing up the probabilities of the three outcomes of rolling a one $$ P(rolled-1) = 1/18 + 1/24 + 1/36 = 1/8 $$ It's the same as calculating it using the law of total probability

$\endgroup$
4
  • 1
    $\begingroup$ There are many possible correct answers, but all of them need to distinguish the six ordered pairs (die, outcome==1), which your second proposal does not do. $\endgroup$
    – whuber
    Commented Jun 30 at 18:19
  • $\begingroup$ Ok, the correct probability of evidence (dice rolled 1) is 0.125 or 1/8 (because 1/3*1/6+1/3*1/8+1/3*1/12). Looking at the first sample space, why isn't just 3/26? $\endgroup$
    – yingele
    Commented Jun 30 at 18:46
  • 1
    $\begingroup$ the (natural) statespace is literally the 26 outcomes you mention (ie a table of which die and which result for that die) $\endgroup$
    – seanv507
    Commented Jun 30 at 18:54
  • 1
    $\begingroup$ do the same calculation for (dice = 6 sided and outcome =1) as for dice rolled =1 . what do you get? $\endgroup$
    – seanv507
    Commented Jun 30 at 19:04

1 Answer 1

4
$\begingroup$

Is it correct to setup the sample space made of 26 outcomes like so?

outcomes from 6-sided dice:  [ 1 2 3 4 5 6
outcomes from 8-sided dice:    1 2 3 4 5 6 7 8
outcomes from 12-sided dice:   1 2 3 4 5 6 7 8 9 10 11 12 ]

This works. It looks like a joint distribution of 'the type of dice' (rows) and the 'number rolled' (columns).

You can fill in the probabilities of each of the 26 samples in this space,

outcomes from 6-sided dice:  [ a b c d e f
outcomes from 8-sided dice:    g h i j k l m n
outcomes from 12-sided dice:   o p q r s t u v w x y z ]

then consider the probability of the type of dice, conditional on the outcome being 1.

I will fill in the first row for you, e.g. the probability that the dice is 6-sided (1/3) and the roll is 1 (1/6) is the product 1/3 x 1/6 = 1/18, or with a different denominator 4/72 (72 is gonna be useful for comparison with the other cases)

outcomes from 6-sided dice:  [ 4/72 4/72 4/72 4/72 4/72 4/72
outcomes from 8-sided dice:    g    h    i    j    k    l    m    n
outcomes from 12-sided dice:   o    p    q    r    s    t    u    v    w    x    y    z ]
$\endgroup$
3
  • 3
    $\begingroup$ 26 letters, how convenient. $\endgroup$
    – qwr
    Commented Jul 1 at 4:54
  • $\begingroup$ This is helpful. My mistake was to assume that each outcome in the sample space has equal probability. It doesn’t: rolling a 1 with a 6-side dice is more likely than rolling a 1 with an 8-side dice. As a consequence, I used the wrong denominator in the Bayes formula, i.e., the probability of rolling a one. It is the sum of the probabilities 1/18+1/24+1/36=0.125. This can be also obtained by applying the law of total probability, P(rolled-1) = P(6-dice)*P(rolled-1|6-dice) + P(8-dice)*P(rolled-1|8-dice)+P(12-dice)*P(rolled-1|12-dice)=1/3*1/6+1/3*1/24+1/3*1/36=0.125. $\endgroup$
    – yingele
    Commented Jul 1 at 22:03
  • 1
    $\begingroup$ @DavidMayer you can also express the probabilities as 4/72, 3/72 and 2/72 and the odds of 4:3:2 for the occurrence of the different dice when the roll is 1 are more directly visible. $\endgroup$ Commented Jul 2 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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