Sum of 3 loaded dice

786 Views Asked by At

I am given 3 loaded dice $D_1$, $D_2$ and $D_3$ and their probability tables $P(D_i = k), 1 \leq k \leq 6$.

I ought to write an algorithm that computes $P(\text{Sum} \mid D_1)$, the sum of all three dice conditioned on the value of the first die.

My intuition lead to the following solution:

For each possible sum of two dice ($2,\ldots,12$) I collected the different possibilities of dice numbers in a table $T$, for instance for the sum $4$ it is $(1,3) (2,2) (3,1)$.

To compute now the probability $P(\text{Sum} = n\mid D_1 = v)$ I sum up the multiplications of $P(D_2 = x)$ and $P(D_3 = y)$ where $x$ and $y$ are taken from the table $T$ I have computed for the sum value $n - v$.

The final result is computed by multiplying this sum with $P(D_1 = v)$.

So why do I post this on Mathematics StackExchange? Here are my questions:

1. Is this approach correct after all?

2. This approach seems very unmathematical, is there a trick to replace one step by a formula? For instance I wondered whether I could use the formula

$$P(Sum|D_1) = \frac{P(D_1|Sum) \cdot P(Sum)}{P(D_1)}$$

But I didn't find that easier.

2

There are 2 best solutions below

0
On BEST ANSWER

The burden is reduced if one notes that, considering $S=D_1+D_2+D_3$, $$ \mathrm P(S=n\mid D_1=v)=\mathrm P(D_2+D_3=n-v\mid D_1=v)=\mathrm P(D_2+D_3=n-v), $$ since $D_1$ and $D_2+D_3$ are independent, and that, for every $2\leqslant k\leqslant12$, $$ \mathrm P(D_2+D_3=k)=\sum_{i=1}^{k-1}\mathrm P(D_2=i)\mathrm P(D_3=k-i). $$

0
On

Intuitively you can treat the question as though it is asking about the sum of the second and third dice (since you are given the value of the first die)

i.e.

$P(D_1+D_2+D_3=n | D_1=v) = P(D_2+D_3=n-v)$