Find the probability of rolling ten different, standard 6-sided dice simultaneously and obtaining a sum of 30?
I started to answer this question by setting up an equation like this:
x1+x2+...+x10=30 with 0 less than or equal to xi less than or equal to 6 But we know the die will have values 1-6 so we have y=x+1 so that y1+y2+...+y10=20 Now I know we can have at most 4 6's, 5 5's, 6 4's, 10 3's, 10 2's, 10 1's.
I was not sure if I am heading in the right direction or should I just find all possible outcomes of the die and use the inclusion-exclusion method to find all the permutations in which the sum will be 30?
Say that $n$ represents the number of dices, $x$ the total sum and $f(n, x)$ the total number of different ways in which this sum can be obtained.
We have the following recurrence relation:
$$f(n,x)=\sum_{i=1}^6 f(n-1, x-i)\tag{1}$$
...which baciscally says that you can calculate $f$ by assuming that the first dice can roll 1,2,3,4,5 or 6 and by adding the number of ways in which you can roll the sums $x-1,x-2,\dots x-6$ by using one dice less.
We have the following exit conditions:
$$x \lt 0 \implies f(n,x)=0\tag{2}$$
$$f(0,0)=1\tag{3}$$
In this particular problem you want to calculate $f(10, 30)$ and then divide the result with the total number of different rolls (which is $6^{10}$). You can complete the task with this miniscule Python script:
And the result is: