Sub topic 3
Probability Basics for Designers
Assume you know basic arithmetic with fractions and percentages, and you have seen dice, cards, and loot systems. This chapter focuses on the probability calculations you need before tuning a random mechanic.
Probability measures how likely an event is. A probability of 0 means the event cannot happen. A probability of 1, or 100%, means it must happen. Most game events fall between these values.
For equally likely outcomes:
probability = favorable outcomes / total outcomes
A fair six-sided die has six possible results. The chance of rolling a 4 is 1/6, or about 16.7%. The chance of rolling an even number is 3/6, because 2, 4, and 6 are favorable outcomes. This simplifies to 1/2, or 50%.
Combining Events
To calculate the chance of event A or event B, add their probabilities when the events cannot happen together. These are mutually exclusive events.
For a single die, rolling a 1 or a 6 has probability:
1/6 + 1/6 = 2/6 = 1/3
If events can overlap, subtract the overlap once. For example, on a d20, the chance of rolling an even number or a number greater than 15 is:
- Even results: 10 outcomes.
- Results greater than 15: 5 outcomes.
- Results that are both: 16, 18, and 20, so 3 outcomes.
- Total favorable outcomes:
10 + 5 - 3 = 12. - Probability:
12/20 = 60%.
To calculate the chance of event A and event B, multiply probabilities when the events are independent. Independent events do not change each other's chances.
The chance of rolling two sixes in a row is:
1/6 × 1/6 = 1/36
The second roll remains a six-sided die even when the first roll was a six.
faces = [1, 2, 3, 4, 5, 6]
chance_even = len([face for face in faces if face % 2 == 0]) / len(faces)
chance_two_sixes = (1 / len(faces)) ** 2
print(chance_even) # 0.5
print(chance_two_sixes) # 0.027777777777777776Dependent Events
Some events change the probability of later events. Drawing cards without replacement is the common example.
A standard deck has 52 cards, including 13 hearts. The chance that the first card is a heart is 13/52, or 25%. If that card is a heart and you do not replace it, the chance that the next card is a heart becomes 12/51. The chance of two hearts in sequence is therefore:
13/52 × 12/51 ≈ 5.9%
| Situation | Correct operation | Example |
|---|---|---|
| Mutually exclusive outcomes | Add | Roll a 1 or 6 |
| Independent events | Multiply | Roll two sixes |
| Dependent events | Multiply changing probabilities | Draw two hearts without replacement |
A Designer's Check
Do not calculate only the chance of success. Also calculate the chance of failure and the chance of repeated attempts. A 10% chance per attempt sounds small, but the chance of at least one success in 10 independent attempts is:
1 - (0.90)^10 ≈ 65.1%
This is often the number players feel.
Exercise
A player has a 20% chance to find a key on each independent search. What is the chance of finding at least one key in three searches?
Show answer
Calculate the chance of failing all three searches: 0.8 × 0.8 × 0.8 = 0.512. Subtract from 1: 1 - 0.512 = 0.488, or 48.8%.