Let’s Make Introductions!
The narrative unfolds in a tavern where seven adventurers gather: the Ranger (a versatile but overconfident leader), the Barbarian (a combat-loving warrior), the Elf (carefree and eccentric), the Dwarf (money-obsessed and mathematically skilled), the Rogue (a master thief), the Magician (book-learned but limited magical abilities), and the Ogre (primitive but good-natured).
The Rules of the Game
The Magician produces 14 dice and introduces foundational probability concepts through three axioms:
She explains three parameter categories:
- Position parameters — expectation, median, mode (determining where results cluster)
- Scale parameters — variance, standard deviation, measuring spread around central values
- Shape parameters — skewness and kurtosis, describing probability distribution behaviour
The Law of the Die
The discrete uniform distribution ensures “each outcome has an equal probability for each mode in a finite set.”
For a fair die with 6 faces:
No mode exists (all faces equally probable).
For a coin flip: each side has probability .
Expectation: Where Results Cluster
The expectation (or mean) of a discrete random variable with values and respective probabilities is:
For a fair six-sided die, each face has probability , so:
Variance: The Spread of Fortune
The variance measures how spread out values are around the mean:
For a uniform distribution on :
The standard deviation returns to the same units as .
The Dungeon
Following tavern chaos resulting in their imprisonment, the adventurers face a locked steel door. The Barbarian attempts a disadvantage roll (rolling twice, keeping the lower result) to break free.
For two independent rolls and , the minimum has distribution:
This shifts the expected outcome downward — disadvantage makes heroic feats significantly harder to achieve, as the Barbarian discovers to his frustration.
Code Example
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
# Fair six-sided die
n_faces = 6
die_values = np.arange(1, n_faces + 1)
die_probs = np.ones(n_faces) / n_faces
mean = np.sum(die_values * die_probs)
variance = np.sum((die_values - mean)**2 * die_probs)
print(f"Mean: {mean:.2f}") # 3.50
print(f"Variance: {variance:.2f}") # 2.92
# Simulate n rolls
n_rolls = 100_000
rolls = np.random.randint(1, n_faces + 1, size=n_rolls)
plt.figure(figsize=(10, 5))
plt.hist(rolls, bins=n_faces, range=(0.5, n_faces + 0.5), density=True, alpha=0.7, label='Simulated')
plt.hlines(1/n_faces, 0.5, n_faces + 0.5, colors='red', label='Theoretical')
plt.xlabel('Die Face')
plt.ylabel('Probability')
plt.title('Uniform Distribution: Fair Die')
plt.legend()
plt.grid(ls='--')
plt.show()
# Disadvantage: roll twice, keep lower
roll1 = np.random.randint(1, n_faces + 1, size=n_rolls)
roll2 = np.random.randint(1, n_faces + 1, size=n_rolls)
disadvantage = np.minimum(roll1, roll2)
print(f"\nWith disadvantage:")
print(f"Mean: {disadvantage.mean():.2f}") # ~2.53
Bibliography
- Jaynes, E.T. (2003). Probability Theory: The Logic of Science, Cambridge University Press
- Feller, W. (1968). An Introduction to Probability Theory and Its Applications, Wiley
- Grimmett, G., Stirzaker, D. (2001). Probability and Random Processes, Oxford University Press