Sum of 3 loaded dice

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.

2022-07-25 20:42:17
Source Share
Answers: 0