Mathematics, Probability, Combinatorics.
the distribution of S: For example, let’s say you roll five six-sided dice and want to find the probability of all the results summing to 21. 16/6 = 2, so Pr(S = 21) = [(20 choose 4)-5(14 choose 4)+(5 choose 2)(8 choose 4)] / 6⁵ =540 / 7776 = 0.069444. We can check this result in Python by using