15
\$\begingroup\$

I'm designing a tabletop game, and I need to figure out how to calculate a few probabilities:

  1. Roll 3 20-sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?
  2. Roll 4 20-sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?
  3. Roll 3 20-sided dice, take the lowest value. What is the probability of it being 7 or higher? 15 or higher?
  4. Roll 4 20-sided dice, take the lowest value. What is the probability of it being 7 or higher? 15 or higher?

How can I do this? Could you explain to me how this works, or even better - give me a simple formula?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ The conversation about the topicality of this question has been moved to chat. \$\endgroup\$ Commented Jul 13, 2020 at 17:30

5 Answers 5

43
\$\begingroup\$

Use a Tree Diagram

Because I am bad at remembering formulas and bad at probabilities in general I like to use a tree diagram. The other answers provide good straight forward solutions you can apply but I hope to show why those methods work.

For Case 4: Rolling 4 d20s and taking the lowest value
If we roll a d20 4 times, the tree will have four levels with two branches at each level: You either roll a 7 or higher, or you don't. At each branch we assign a probability for that individual outcome: in this case, a 6/20 for rolling a 1-6, and a 14/20 for rolling a 7-20. In this diagram I haven't filled out the branches where we roll a 1-6 because they're not relevant for this question.

Tree diagram of rolling at least 7 on all of 4 d20 rolls

To calculate the final probability, we need each roll to result in a 7-20. For this, we take the probability of each branch and multiply them together, so we get

$$\frac{14}{20} \cdot \frac{14}{20} \cdot \frac{14}{20} \cdot \frac{14}{20} = \left(\frac{14}{20}\right)^4 \approx 24\% $$

For 15 or higher in this case, we can substitute 14/20 with 6/20 and hence get $$\frac{6}{20} \cdot \frac{6}{20} \cdot \frac{6}{20} \cdot \frac{6}{20} = \left(\frac{6}{20}\right)^4 \approx 0.8\% $$

For case 3: Rolling 3 d20s and taking the lowest
Similarly if we were to look at 3 dice rolls instead, the tree would only have 3 levels, and hence we would only end up multiplying the probability 3 times, so we would get

$$\frac{14}{20} \cdot \frac{14}{20} \cdot \frac{14}{20} = \left(\frac{14}{20}\right)^3 \approx 34\% $$

For cases 1 and 2: taking the highest value
Now if we were interested in finding the probability of getting 7 if we took the highest roll each time we would have to consider the likelihood of getting a 7-20 once anywhere in the tree, not just the branch where we get it 4 times in a row, which would be more complex. Luckily there's a trick for these kinds of situations: Instead of considering the probability of getting at least 1 7-20 in 4 rolls, we can consider the probability of never getting a 7-20 in 4 rolls and our result will be 1 minus that probability.

So to do that we must first find the likelihood of getting a 1-6 4 times in a row, and we would see that it is as above

$$ \frac{6}{20} \cdot \frac{6}{20} \cdot \frac{6}{20} \cdot \frac{6}{20} = \left(\frac{6}{20}\right)^4 \approx 0.8\% $$

Therefore we must take 1 (or 100%) and subtract the probability we found which gives us a 99.2% chance of rolling at least a 7 in 4 rolls. Likewise for 3 rolls we get 97.3%

\$\endgroup\$
7
  • 10
    \$\begingroup\$ The solution seems wrong(it is not) until you get to the last paragraph; It would be good to explain the oneminus function before getting into those calculactions instead of at the very end. \$\endgroup\$
    – Gensys LTD
    Commented Jul 12, 2020 at 12:13
  • 4
    \$\begingroup\$ ah tree diagrams, I really don't understand why more people do not use them for probability questions; they are such an excellent tool for figuring out probabilities. \$\endgroup\$ Commented Jul 13, 2020 at 11:37
  • \$\begingroup\$ Another handy hint: If you want the probability of getting exactly a number you can do this maths for the number of interest (n) and also n+1. Subtract the probability of getting >= n+1 from the probability of getting >= n and you have the probability of getting exactly n. The maths for doing this is much, much simpler than trying to do it for every number at every level (where the tree diagram would be gargantuan). \$\endgroup\$
    – Joe Bloggs
    Commented Jul 14, 2020 at 9:28
  • \$\begingroup\$ @JoeBloggs maybe I understood this wrongly, but I think this is not correct. If I understood correctly, to find the probability of having at least one 7 should be calculated as P(>=7) = 1-(6/20)^4 = 99.2%, then P(>=8) = 1-(7/20)^4 = 98.5%, then P(7) = P(>=7) - P(>=8) = 0.7%. However this means that throws like 7,6,3,8 are not allowed (since this is in the P>=8 case). The exactly a number case should be calculated as P(7) = 1-(19/20)^4 = 18.5%. However please correct me if I understood not correctly the comment ;) \$\endgroup\$
    – frarugi87
    Commented Jul 14, 2020 at 10:19
  • \$\begingroup\$ @frarugi: my comment is about the final number (given that you’re taking the highest) being exactly 7. You have to exclude every case where a number higher than 7 is rolled as well, even if a 7 has been rolled. Your calculation is the chance of getting at least one 7, but ignores the fact that if you roll an 8 as well the final result will be 8. \$\endgroup\$
    – Joe Bloggs
    Commented Jul 14, 2020 at 10:40
45
\$\begingroup\$

AnyDice is straight forward for this

If you want to save yourself going through the maths, AnyDice will solve this for you.

While doing more complex things can get tricky (up to not possible), it's quick and easy for stuff like this. You need to use the highest N of DICE and lowest N of DICE functions and comparisons, which give the outcomes (1 being true and 0 false) which probabilities of those outcomes. This is the code for the basis of your cases, and here on AnyDice.com. I'll leave playing around with the numbers as an exercise for the reader.

output [highest 1 of 3d20] >= 7
output [lowest 1 of 3d20] >= 7

Alternately, you can drop the comparisons and use the At Most and At Least Data views.

\$\endgroup\$
0
20
\$\begingroup\$

Roll 3 20-sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?

The key is to realise that the probability of getting seven or more is what's left when you subtract the probability of not getting it from one. So what is the probability that the value of all three dice is less than seven (so, 1-6)?

The product rule states that the probability of two (or more) independent events occurring together can be calculated by multiplying the individual probabilities of the events. The probability of rolling 1-6 once is 30% (6/20). So the probability of rolling it three times is 30% × 30% × 30%, or 2.7%. Subtracting this from one gives you a 97.3% chance of rolling at least one score of seven or higher with 3d20.

\$\endgroup\$
1
  • \$\begingroup\$ (And the rest via the same method...) \$\endgroup\$
    – tardigrade
    Commented Jul 11, 2020 at 22:58
7
\$\begingroup\$

This key insight makes solving these really easy: The statement "the lowest value is N or higher" is equivalent to "all of the values are N or higher".

Let's start with this one:

Roll 3 20-sided dice, take the lowest value. What is the probability of it being 7 or higher? 15 or higher?

Rewrite that as this:

Roll 3 20-sided dice. What is the probability of all of them being 7 or higher? 15 or higher?

It's trivial to see that for a single roll of a d20, there's a \$\frac{14}{20}\$ chance that it's 7 or higher, and a \$\frac{6}{20}\$ chance that it's 15 or higher. So that means there's a \$(\frac{14}{20})^3 = 0.343\$ chance that all three are 7 or higher, and a \$(\frac{6}{20})^3 = 0.027\$ chance that all three or 15 or higher.


Now let's look at this one:

Roll 3 20-sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?

First, let's temporarily invert it so we find the complementary probability:

Roll 3 20-sided dice, take the highest value. What is the probability of it being 6 or lower? 14 or lower?

Now we can apply a slightly different variant of the same principle: The statement "the highest value is N or lower" is equivalent to "all of the values are N or lower". So rewrite it as this:

Roll 3 20-sided dice. What is the probability of all of them being 6 or lower? 14 or lower?

It's trivial to see that for a single roll of a d20, there's a \$\frac{6}{20}\$ chance that it's 6 or lower, and a \$\frac{14}{20}\$ chance that it's 14 or lower. So that means there's a \$(\frac{6}{20})^3 = 0.027\$ chance that all three are 6 or lower, and a \$(\frac{14}{20})^3 = 0.343\$ chance that all three or 14 or lower.

But remember, this time we took the complement, so we need to subtract these answers from 1 to get the answers to the original question: The probability that the highest value is 7 or higher is \$1 - 0.027 = 0.973\$, and the probability that the highest value is 15 or higher is \$1 - 0.343 = 0.657\$.

\$\endgroup\$
0
\$\begingroup\$

For the highest:

  1. If you roll \$n\$ d20 dice and choose the highest result, then the result is not at least \$m\$ if all rolls are \$m-1\$ or less.
  2. The chance of that happening for a single die is \$\frac{m-1}{20}\$.
  3. This gives us a figure of \$\left(\frac{m-1}{20}\right)^n\$.
  4. The result is at least m if it is not not at least m, so the probability of that is \$1-\left(\frac{m-1}{20}\right)^n\$.
  5. Plugging \$n=3\$ and \$m=15\$, you get 657/1000, you can compute it by hand, using a calculator or via e.g. Wolfram Alpha.

Likewise, if you choose the lowest result, then the result is at least \$m\$ if all the rolls are not \$m-1\$ or less. For a single die the chance of that happening is \$1-\frac{m-1}{20}=\frac{21-m}{20}\$. For \$n\$ dice, this gives you the probability of \$\left(\frac{21-m}{20}\right)^n\$.

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .