Programming Assignment: Loaded Dice (C3_W2_Assignment)

How can we compute probabilities for each possible value of x here? The possible values of x are [2, 3, 4, 5, 6, 7, 8].

dice = [1, 2, 3, 4]
first_throw = np.random.choice(dice, size=40_000)
second_throw = np.random.choice(dice, size=40_000)
sum_throws = first_throw + second_throw

ax = sns.histplot(sum_throw, stat=‘probability’)
ax.set_title(‘Histogram of 40,000 throws’)

a) Find the number of possible combinations.
b) Find the number of combinations that give each sum.
Divide b / a.