In the kingdom of Randomia, nothing was ever certain — not the weather, not the harvest, not even the roll of a single die at the market square. Yet the kingdom did not fear uncertainty. Long ago, its scholars discovered that even chance obeys quiet laws, and those who learn these laws are given the title Royal Reckoner.
You are Lyra Quill, a new apprentice at the Reckoner's Guild. Your guide is old Master Aleph, keeper of the Oracle Archive, who promises to walk you through five realms of the kingdom — each one guarding a piece of the puzzle of chance. Master every realm, and the crown will name you Royal Reckoner of Randomia.
Your travel log — the random variable — is simply a rule that assigns a number to every possible outcome of an uncertain event. In this unit, we study the kind of random variable that can only take a countable list of values (like 0, 1, 2, 3…), which the guild calls a discrete random variable, written \(X\).
The Hall of Tables
Master Aleph leads you into a marble hall lined with endless scrolls. "Every game of chance in this kingdom," he says, "can be written as a table — one column for what could happen, one column for how likely it is." He unrolls a scroll showing the spin of a carnival wheel, its numbers and odds sitting side by side like matched dance partners.
"But beware," Aleph warns, tapping the scroll with his cane. "A table only earns the Guild's seal if it follows two sacred rules. Break them, and the table is false."
Concept · Probability Distribution Table
A discrete random variable \(X\) lists every value it can take, alongside the probability of each value. This is called its probability distribution.
In plain words: no probability can be negative or bigger than 1, and all the probabilities together must add up to exactly 1 (100% of everything that could happen).
| x | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| P(x) | 0.10 | 0.30 | ? | 0.20 |
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(x) | 1/8 | 3/8 | 3/8 | 1/8 |
The Treasurer's Ledger
The Royal Treasurer greets you with a heavy ledger. "Every merchant asks me the same question," she sighs, "‘What should I expect to earn, on average, if I play this game a thousand times?’" She shows you her trick: multiply each outcome by its likelihood, then add everything together. This single number is the game's heart — its long-run average.
Concept · Expected Value E(X)
The expected value (also called the mean, \(\mu_X\)) of a discrete random variable is the weighted average of all its possible values, where each value is weighted by its probability.
This is not a value \(X\) has to actually land on — it's the balance point of the distribution, the value you'd expect on average over many, many repetitions.
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(x) | 1/8 | 3/8 | 3/8 | 1/8 |
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(x) | 0.4 | 0.3 | 0.2 | 0.1 |
The Alchemist's Spread
Deep in a candle-lit workshop, the Royal Alchemist mixes potions of wildly different strengths. "Knowing the average potency isn't enough," she says, swirling a vial. "Two potions can share the same average strength, yet one is wonderfully consistent while the other explodes half the time! I need a number that tells me how spread out the outcomes are."
She teaches you her measure: for every outcome, find its distance from the mean, square it (so far-away outcomes count extra), weight by probability, and add it all up. This is the variance. Its square root — back in the same units as \(X\) — is the standard deviation.
Concept · Variance & Standard Deviation
The shortcut formula \(E(X^2)-[E(X)]^2\) is usually the fastest path: find \(E(X)\) first, then find \(E(X^2)=\sum x^2 P(x)\), then subtract.
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(x) | 1/8 | 3/8 | 3/8 | 1/8 |
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(x) | 0.4 | 0.3 | 0.2 | 0.1 |
The Royal Mint
At the Royal Mint, coins are melted, re-measured, and re-stamped by a fixed rule: multiply by a constant, add a constant. "Every currency conversion, every flat fee, every tax," says the Mint Master, "is just a straight line drawn through the old values: \(Y = aX+b\)." He shows you how the whole distribution shifts and stretches — but never changes shape.
Concept · Linear Transformations
If \(Y = aX + b\) for constants \(a\) and \(b\):
Adding a constant \(b\) shifts the center but never changes the spread (adding $3 flat to every price doesn't make prices more variable). Multiplying by \(a\) stretches both the center and the spread — and variance gets multiplied by \(a^2\), never just \(a\), because variance is already in "squared units."
The Twin Traders
At the final gate stand the Twin Traders, Corin and Della, who never share information about their sales — truly independent merchants. "People assume that if you subtract my earnings from hers," Corin laughs, "the uncertainty should shrink. It doesn't! Randomness never cancels — it only adds up."
This is the final, and most surprising, lesson of Randomia: means behave exactly as you'd expect under addition and subtraction, but variances only ever add — even when the random variables themselves are being subtracted.
Concept · Sum & Difference of Independent Random Variables
The one trap every apprentice falls into: variances are added for both the sum and the difference of independent variables. They are never subtracted, since variability from two separate, independent sources can only pile up — it can never partially cancel out.
The Scroll of Wisdom
You return to Master Aleph's archive, your travel log filled with five hard-won lessons. He rolls out one final, blank scroll. "Copy down what you've learned," he says, "in your own hand — for the Reckoner who understands a law well enough to summarize it, owns that law forever." With that, you are named Royal Reckoner of Randomia.
2.1 Probability Distribution Tables
2.2 Expected Value
2.3 Variance & Standard Deviation
2.4 Linear Transformations \(Y=aX+b\)
2.5 Sum & Difference of Independent Variables
Answer Key — Quick Reference
- 2.1 Ex.1: P(3) = 0.40
- 2.1 Ex.2: P(0,1,2,3) = 1/8, 3/8, 3/8, 1/8
- 2.1 Try: Not valid, sums to 1.10
- 2.2 Ex.1: E(X) = 1.5
- 2.2 Ex.2: E(win)=$3.60, E(net)=−$1.40
- 2.2 Try: E(X) = 1.0
- 2.3 Ex.1: Var=0.75, SD≈0.87
- 2.3 Ex.2: Var=1.0, SD=1.0
- 2.3 Try: Var=4, SD=2
- 2.4 Ex.1: E=68, SD=9, Var=81
- 2.4 Ex.2: E=11, SD=2.4
- 2.4 Try: E=75, SD=8
- 2.5 Ex.1: E(T)=75/SD≈6.40; E(D)=15/SD≈6.40
- 2.5 Ex.2: E(D)=6, SD≈3.91
- 2.5 Try: Var(X−Y)=13
— End of Unit 2: Discrete Random Variables —
May your calculations be ever accurate, Royal Reckoner.