probability of rolling combined $3$ or lower with $4$ dice, discarding the highest $2$ using combination math?

44 Views Asked by At

Using Python script to simulate, I found that if you roll $4$ dice, discarding the highest two results and the resulting sum being $3$ or lower has a probability of $\sim 0.3285$.

How does one calculate this without simulating a large number of dice rolls? Edit, here is the python code used for the approximation simulation:

from random import randint

def dice_roll(amount):
    r = []
    for i in range(amount):
        r.append(randint(1,6))
    r.sort()
    return r
    
count = 0
it = 10000
amount_of_dice = 4
max_sum_of_lowest_two = 3

for i in range(it):
    if sum(dice_roll(amount_of_dice)[:2]) <= max_sum_of_lowest_two:
        count += 1
print(count/it)
1

There are 1 best solutions below

4
On BEST ANSWER

If you insist on a pen-and-paper result, you can break into cases: At least two 1's rolled (and so sum of 2), and Exactly one 1 rolled with at least one 2 rolled. For the first case, you could calculate as $1$ minus the probability of exactly zero or exactly one 1 rolled. For the second case, it is the probability of exactly one 1 minus the probability of exactly one 1 with no 2's.

$$\underbrace{\left(1 - \overbrace{\frac{5^4}{6^4}}^{\text{no 1's}} - \overbrace{4\cdot\frac{5^3}{6^4}}^{\text{one 1}}\right)}_{\text{at least two 1's}} + \underbrace{\left(\overbrace{4\cdot\frac{5^3}{6^4}}^{\text{one 1}}-\overbrace{4\cdot\frac{4^3}{6^4}}^{\text{one 1, no 2's}}\right)}_{\text{one 1 and at least one 2}} = \frac{415}{1296}$$

To emphasize, I would not recommend doing this if the numbers were even slightly different. I would not recommend doing this for sum of $4$ or less, nor would I recommend doing this for the general problem.


example of code to brute force the calculation:

tot=0; count=0; for(a=1;a<7; a++){ for(b=1; b<7; b++){ for(c=1; c<7; c++){ for(d=1; d<7; d++){tot=tot+1; if (a+b<4 || a+c<4 || a+d<4 || b+c<4 || b+d<4|| c+d<4){ count=count+1}}}}}

The above gives that count is equal to $415$ and total gives $1296$ as expected. Adjusting the pen-and-paper approach to accommodate the sum being $4$ or less instead would be tedious. Adjusting the code above replacing 4's with 5's gives the probability of the sum being $4$ or less as $\dfrac{676}{1296}$ very easily. Given time and effort, one could write the code in such a way as to have a variable number of dice, a variable number of discards, a variable number of sides, and a variable target. I leave that as an exercise to the reader if desired.