ProbabilityFormulBase · formulary masterclass
Formulary · probability

Probability

Measuring chance without predicting it. A vocabulary (sample space, events), a handful of calculation rules, a tree that gets weighted and turned around, and a headline distribution, the binomial. The whole chapter rests on combinatorics: count the cases, then weigh them.

0The symbols

English

The chapter speaks the language of sets: every symbol translates a sentence about chance.

SymbolMeaning
Ω The sample space: the set of all possible outcomes of the experiment. For a die, Ω = {1, 2, 3, 4, 5, 6}.
A, B Events: subsets of Ω. "Rolling an even number" is the event {2, 4, 6}.
The complement: everything not in A. It occurs exactly when A fails.
A ∪ B "A or B": at least one of the two happens. The mathematical "or" is not exclusive.
A ∩ B "A and B": both happen at once. If A ∩ B = ∅, the events are mutually exclusive.
P(A) The probability of A: a number between 0 and 1 that measures the chance of A. P(Ω) = 1, P(∅) = 0.
P(A | B) Conditional probability: the chance of A given that B has occurred. The sample space shrinks to B.
X A random variable: a number attached to each outcome. The payoff of a game, the sum of two dice.
E(X) The expected value: the average of the values of X, weighted by their probabilities. The average long-run payoff.
σ The standard deviation: the typical spread of X around its expected value. Its square is the variance V(X).
B(n, p) The binomial distribution: the number of successes in n independent repetitions of a trial that succeeds with probability p.
Trap number one
A probability is never a hunch: it is a ratio between cases, or a limiting frequency. Before any calculation, write down the sample space Ω. Half the mistakes in this chapter come from a poorly chosen sample space, where unequal outcomes are treated as equal.

1The language of events

English

Before calculating, you need to be able to say it. "Or", "and", "not", "at least": every word of the problem becomes a set operation.

1.1 · Sample space and events

What
EN

A random experiment is an experiment whose possible outcomes are all known in advance, without being able to predict which one will occur. The sample space Ω gathers them all; an event is a subset of Ω, and it "occurs" when the outcome obtained belongs to it.

Ω A B A ∩ B A ∪ B = everything colored, counted twice in the middle if you add
The diagram says it all: adding P(A) and P(B) counts the central lens twice. Hence the inclusion-exclusion formula.

1.2 · The calculation rules

The complement
P(A̅) = 1 − P(A)
The union
P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
Why
EN

A and A̅ share the sample space without overlapping: their probabilities add up to 1. The complement rule is nothing more than that, but it is the most profitable tool in the chapter: "at least one" is almost always computed as "one minus none".

For the union, the diagram in section 1.1 supplies the proof: P(A) + P(B) counts the intersection twice, so we subtract it once. If A and B are mutually exclusive, the intersection is empty and the formula reduces to simple addition.

Example A die: A = "even" = {2, 4, 6}, B = "at least 4" = {4, 5, 6}. P(A ∪ B) = 3/6 + 3/6 − 2/6 = 4/6 = 2/3. Direct check: A ∪ B = {2, 4, 5, 6}, four outcomes out of six.

2Equally likely outcomes

English

When every outcome has the same chance, probability becomes pure counting: this is the bridge between this chapter and the previous one.

Laplace's rule
P(A) = favorable cases / possible cases = |A| / |Ω|
What
EN

In a finite sample space where every outcome carries the same weight, the probability of an event is the proportion of outcomes it contains. Count the numerator, count the denominator: the four formulas of combinatorics become the two floors of a fraction.

Why
EN

The assumption does all the work: "fair", "at random", "well shuffled" are the words that, in a problem statement, license Laplace. Without them, the formula is illegal.

The classic trap is a sample space whose outcomes don't carry equal weight. The sum of two dice takes eleven values, from 2 to 12, but these eleven values are not equally likely: you have to go down to the 36 ordered pairs, which are.

Example Sum of two dice equal to 7: the favorable pairs are (1,6), (2,5), (3,4), (4,3), (5,2), (6,1), that is 6 out of 36: P = 1/6. The sum 12 has only one pair, (6,6): P = 1/36. Eleven values, and yet not 1/11 each.
Example A hand of 2 cards from a deck of 36, probability of two aces: C(4,2) / C(36,2) = 6 / 630 = 1/105. Both the numerator and the denominator come straight from the combinatorics masterclass.

3Frequency and chance

English

What does "six comes up with probability 1/6" mean for a die rolled only once? The experimental answer: roll it many times. The relative frequency of each face settles around its probability, that is the law of large numbers.

Try it here: roll 10 times, then 10,000. Watch the disorder of small samples, then the order that sets in. The ocre marks show the theoretical values.

Laboratory · the law of large numbers
N (rolls)0
Largest gap |freq. − prob.|·

Watch out
The law of large numbers talks about frequencies, not compensation. After five sixes in a row, the die "owes" nothing: the probability of the sixth six stays 1/6. Chance has no memory; it is the proportion that converges, not the running count that balances out.

4Conditional probability and the tree

English

Information changes the odds. "Given that" is the most important phrase in the chapter, and the weighted tree is its calculating machine.

4.1 · Given that

Conditional probability
P(A | B) = P(A ∩ B) / P(B) · P(B) ≠ 0
What
EN

Learning that B has occurred shrinks the sample space: outcomes outside B are eliminated. The chance of A is recalculated within this reduced world, dividing by P(B) so the new total comes to 1.

Example A die: given that the result is even, what is the chance it exceeds 3? The sample space shrinks to {2, 4, 6}; two of these three outcomes exceed 3: P = 2/3, versus 1/2 without the information.

4.2 · The weighted tree

The product rule
P(A ∩ B) = P(A) · P(B | A) · along a path
Total probability
P(B) = P(A) · P(B | A) + P(A̅) · P(B | A̅) · sum of the paths to B
R B R B R B 3/5 2/5 2/4 2/4 3/4 1/4 3/5 · 2/4 = 6/20 3/5 · 2/4 = 6/20 2/5 · 3/4 = 6/20 2/5 · 1/4 = 2/20
An urn, 3 red and 2 blue, two draws without replacement. The second tier carries conditional probabilities: the path's past has changed the urn. Total of the leaves: 20/20.
Why
EN

The tree encodes three rules in one picture. Along a path, you multiply: that is the definition of conditional probability, read backwards. Branches from the same node total 1: the complement rule demands it. And the probability of a final event is the sum of every path leading to it: total probability.

Discipline pays off: every weight on the second tier is a conditional probability, computed in the world where the first tier has already happened.

Example Probability that the second ball is red: paths RR and BR, that is 6/20 + 6/20 = 12/20 = 3/5. The same value as on the first draw, and that is no coincidence: without information about the first ball, the second is "a ball at random".

5Turning the tree around: Bayes

English

The tree gives P(test positive | sick). The doctor's question runs the other way: P(sick | test positive). Bayes' theorem makes the U-turn, and its result surprises almost everyone.

Set the disease and the test, and read the answer in head counts: out of 10,000 people, the false positives from the large healthy population often swamp the true positives from the small sick population.

Bayes' theorem
P(A | B) = P(A) · P(B | A) / P(B) · P(B) via total probability
Laboratory · the screening test
M + + · · · · · · · · · ·
P(+)·
P(M | +)·

Why
EN

The formula holds no mystery: it is the definition of conditional probability, applied twice to the same P(A ∩ B). What is surprising is the weight of prevalence: an excellent test for a rare disease mostly produces false positives, because the healthy vastly outnumber the sick.

The reflex that saves you: translate into head counts. "Out of 10,000 people..." makes visible what percentages hide.

6Independence

Independent events
P(A ∩ B) = P(A) · P(B) · equivalent to P(A | B) = P(A)
What
EN

Two events are independent when knowing that one has occurred changes nothing about the odds of the other. Then, and only then, "and" is computed by simple product.

Why
EN

This is the product rule stripped of its condition: if P(B | A) = P(B), then P(A ∩ B) = P(A) · P(B). Two rolls of a die, two draws with replacement: independent. Two draws without replacement: dependent, the urn remembers.

Do not confuse independent with mutually exclusive: mutually exclusive events with nonzero probabilities are violently dependent, since one rules out the other.

Example "At least one six in four rolls": the complement is "no six", four independent events of probability 5/6, so P = 1 − (5/6)⁴ ≈ 0.518. The complement and independence, the chapter's two tools in a single line.

7Expected value

The expected value of a random variable
E(X) = Σ xᵢ · P(X = xᵢ) · weighted average
What
EN

A random variable attaches a number to each outcome: a payoff, a sum, a count. Its expected value is the average of these numbers, each weighted by its probability: what the game pays on average, over the long run.

Why
EN

The law of large numbers from section 3 gives the meaning: the average of observed results converges to E(X). An expected value is therefore not a prediction for tomorrow, it is a balance sheet for a thousand tomorrows.

A game is fair when the expected net payoff is zero. Casino games never are: their expected value is negative for the player, that is the house's business model.

Example A fair die: E(X) = (1 + 2 + 3 + 4 + 5 + 6)/6 = 3.5. A value the die can never produce: the expected value is an average, not an outcome. Game: bet 1 franc, win 4 francs if a six comes up. E(net gain) = (1/6) · 3 + (5/6) · (−1) = −2/6: unfavorable.

8The binomial distribution

English

Repeat a trial n times, independently, where it succeeds with probability p, and count the successes: that is the binomial distribution. It brings together this whole chapter and the previous one: independence gives pᵏ(1 − p)ⁿ⁻ᵏ, combinatorics gives the Cₙᵏ.

The binomial distribution B(n, p)
P(X = k) = Cₙᵏ · pᵏ · (1 − p)ⁿ⁻ᵏ · E(X) = n · p · σ = √(n · p · (1 − p))
n = 4 trials, k = 2 successes: each path weighs p²(1−p)² SSFF SFSF SFFS FSSF FSFS FFSS 6 paths = C(4,2), hence P(X = 2) = 6 · p²(1−p)² choosing where among the trials the successes fall: pure combinatorics
The binomial coefficient counts the words: as many paths with k successes as there are ways to place k letters S among n cells.
English

Explore the whole distribution: n and p draw the histogram of every P(X = k). Click a bar to read its exact value and the cumulative. The ocre mark under the axis shows the expected value np.

Laboratory · the histogram of B(n, p)
The chosen bar·
P(X ≤ k)·
E(X) = np · σ·

Example Five rolls of a die, exactly two sixes: X follows B(5, 1/6), so P(X = 2) = C(5,2) · (1/6)² · (5/6)³ = 10 · 125/7776 ≈ 0.161. And "at least one six" again goes through the complement: 1 − (5/6)⁵ ≈ 0.598.

9The method

English

Five steps, in order. The first four choose the tool; the fifth avoids embarrassment.

1
Write down the sample space, and check for equal likelihood.
What exactly counts as an outcome? Do all outcomes have the same chance? If so, Laplace and combinatorics; if not, go down to a finer sample space that is equally likely.
2
Translate the words into operations.
"Or" becomes ∪, "and" becomes ∩, "not" becomes the complement. "At least one" triggers the complement reflex: one minus none, almost always shorter.
3
Does the experiment have stages?
If so, draw the weighted tree. Multiply along the paths, add the paths that lead to the goal. Every weight on the second tier is conditional: the urn after, not the one before.
4
Recognize the standard situations.
Does the question reverse a conditional probability? Bayes. Does it count successes in n independent repetitions? Binomial. Does it ask for an average payoff? Expected value. Three signatures that settle half the exercises.
5
Check the order of magnitude.
Every probability lives between 0 and 1; the leaves of a tree total 1; a result of 3.2 is not a bold probability, it's a mistake. And on a small case, enumerate to check.

10Six mistakes

Mistake 1
Assuming equal likelihood without checking it. "Win or lose, so fifty-fifty": the chapter's best-selling fallacy. Eleven sums of two dice, and yet not 1/11 each. Laplace requires a sample space where every outcome carries the same weight.
Mistake 2
Confusing P(A | B) with P(B | A). "99% of the sick test positive" does not mean 99% of the positives are sick: the laboratory in section 5 shows the gap, sometimes by a factor of fifty. The direction of the vertical bar is not decorative.
Mistake 3
Multiplying without independence. Two draws without replacement, two failures of the same network, two symptoms of the same disease: dependent. The simple product requires independence; otherwise it's the product rule with a condition, hence the tree.
Mistake 4
Adding without subtracting the intersection. "Spades or face cards": 9/36 + 12/36 counts three cards twice; the correct answer requires − 3/36. The diagram from section 1 is worth a thousand rereadings.
Mistake 5
Lending memory to chance. After five heads, believing tails is "overdue"; after five losses, believing a win is "due". The coin keeps no books. The law of large numbers speaks of long-run proportions, never of the next toss.
Mistake 6
Attacking "at least one" head-on. Breaking it into "exactly one, exactly two, ..." is long and riddled with overlaps. The complement does the job in one line: P(at least one) = 1 − P(none). If your calculation is ballooning, that's the signal.

11Test yourself

English

Eight questions, exactly one correct answer each time. The explanation appears after your choice.

12The vocabulary in French and German

This formulary comes from Swiss gymnasium (high school) classrooms; here are the terms in their original languages.

FrançaisDeutsch
la probabilitédie Wahrscheinlichkeit
l'expérience aléatoiredas Zufallsexperiment
l'universder Ergebnisraum
l'issuedas Ergebnis
l'événementdas Ereignis
l'événement contrairedas Gegenereignis
incompatibles / disjointsunvereinbar / disjunkt
équiprobablegleichwahrscheinlich
cas favorables / possiblesgünstige / mögliche Fälle
la fréquence relativedie relative Häufigkeit
la loi des grands nombresdas Gesetz der grossen Zahlen
la probabilité conditionnelledie bedingte Wahrscheinlichkeit
sachant queunter der Bedingung, dass
l'arbre pondérédas gewichtete Baumdiagramm
les probabilités totalesdie totale Wahrscheinlichkeit
la formule de Bayesder Satz von Bayes
indépendantunabhängig
avec / sans remisemit / ohne Zurücklegen
la variable aléatoiredie Zufallsgrösse
l'espéranceder Erwartungswert
la variance / l'écart-typedie Varianz / die Standardabweichung
le jeu équitabledas faire Spiel
l'épreuve de Bernoullidas Bernoulli-Experiment
le succès / l'échecder Erfolg / der Misserfolg
la loi binomialedie Binomialverteilung
le dépistagedas Screening / die Reihenuntersuchung