Probability Basics
Probability is how we put a number on uncertainty. A probability is just a value between 0 (impossible) and 1 (certain) that says how likely something is. The most useful way to think about it: a probability is the long-run frequency of an event if you could repeat the situation over and over.
Probability as long-run frequency
Say a coin has a 0.5 chance of heads. That doesn't promise heads on any particular flip, or even 5 heads in 10. It's a statement about the long run: flip it enough times and the proportion of heads will close in on 0.5. This is the Law of Large Numbers, and it's the bridge between abstract probability and actual data. It has a close relative you meet later: the law says where the proportion settles, while the Central Limit Theorem describes the shape of the wobble on the way there.
🎮 Law of Large Numbers
Set how biased the coin is, then flip. The jagged line is the running proportion of heads; the dashed line is the true probability it's chasing.
Two things to watch for: early on, the proportion swings wildly, because a handful of flips tells you almost nothing. As the flips pile up, the line stops wandering and hugs the true value. (And note: even a "fair" coin spends most of its time slightly off 0.5. It converges, but it never has to land exactly on it.)
Sample space and events
Before any rule can be applied, the situation needs a list. The sample space is every outcome the random phenomenon can produce, written S. Roll one die and S = {1, 2, 3, 4, 5, 6}. Flip two coins and S = {HH, HT, TH, TT}, which is four outcomes rather than three, because HT and TH are genuinely different results that happen to give the same count of heads. An event is any collection of outcomes you care about. "Even" is the event {2, 4, 6}; "at least one head" is {HH, HT, TH}.
When every outcome in S is equally likely, probability becomes counting. Count the outcomes in the event, divide by the count in S, and that is the answer: P(even) = 3/6 = .5. Most of the work in an exam question is building S correctly, and most of the mistakes live there too. Two coins have four outcomes, not three. Two dice have 36, not 21.
Four rules to start from
- Range. Every probability lies between 0 and 1. Nothing is less likely than impossible.
- Total. The probabilities of all the outcomes in S add to exactly 1.
- Complement. P(not A) = 1 − P(A). The chance of not rolling a 6 is 1 − 1/6 = 5/6.
- Addition for disjoint events. If two events cannot both happen, P(A or B) = P(A) + P(B). Rolling a 1 or a 2 is 1/6 + 1/6 = 1/3.
Events that cannot both happen are called disjoint, or mutually exclusive; the two words mean the same thing and both turn up in exam papers. The complement rule looks too small to matter and does more work than any other line on this page, because a question about "at least one" is nearly always easier to answer from the other end. Count the ways it fails to happen, then subtract from 1. That single move solves the first of the three classic problems below.
When events overlap: the general addition rule
The addition rule above carries a condition, and it breaks the moment two events can happen together. Adding P(A) and P(B) counts everything in the overlap twice, once inside each total, so the repair is to hand one copy back:
P(A or B) = P(A) + P(B) − P(A and B)
One example carries the rest of this lesson. A firm asked every one of its 200 employees how they get to work, then sorted the replies by whether the person is under 30.
| Cycles | Does not | Total | |
|---|---|---|---|
| Under 30 | 48 | 52 | 100 |
| 30 or over | 22 | 78 | 100 |
| Total | 70 | 130 | 200 |
Pick one employee at random. P(under 30 or cycles) is not .50 + .35 = .85, because the 48 people who are both have been counted in each of those totals. Subtracting them once leaves .50 + .35 − .24 = .61, and counting the same people directly agrees: 100 + 70 − 48 = 122 of 200, which is .61. Disjoint events are simply the case where the overlap is empty, which is why the shorter rule works there and only there.
Independence and the multiplication rule
Two events are independent when knowing that one happened leaves the probability of the other exactly where it was. Separate coin flips qualify. So do two draws from a deck, provided you put the first card back. For independent events, probabilities multiply:
P(A and B) = P(A) × P(B)
Two fair coins both landing heads is ½ × ½ = ¼. Three sixes in a row is (1/6)³ = 1/216. The rule extends to as many independent events as you like, and it is the reason a long run looks miraculous while a short one is unremarkable.
Watch out for "independent." Multiplying only works when events truly don't affect each other. Drawing cards without replacement, or events that share a common cause, break independence, and most real-world probability mistakes come from assuming it when it doesn't hold.
The addition and multiplication rules together settle an argument that breaks out at most games tables. Two dice have 36 equally likely outcomes, and the eleven possible totals do not share them evenly: one combination makes 2, and six make 7. Counting them all out gives a triangular distribution, which you can build a die at a time in the distribution playground and watch turn into a bell.
Conditional probability
The rule for events that do affect each other needs a new symbol. P(A | B), read "the probability of A given B", asks a narrower question than P(A): not how common something is among everyone, but how common it is among the people who are also B. The definition rescales one probability by another:
P(A | B) = P(A and B) / P(B)
Conditioning discards every row of the table that fails the condition, so the denominator shrinks to that row's own total rather than staying at 200. In the survey, P(cycles) = 70/200 = .35 across the whole company, while P(cycles | under 30) = 48/100 = .48. The gap between those two numbers is the association that the rest of Stats 1 and Stats 2 exists to test. Independence is the special case where the gap is zero, so that P(A | B) = P(A) and learning B tells you nothing.
Rearranging the definition gives the general multiplication rule, which holds whether or not the events are independent:
P(A and B) = P(A) × P(B | A)
On the table, P(under 30 and cycles) = .50 × .48 = .24, matching the 48 of 200 you can read off directly. Where the events happen to be independent, P(B | A) is just P(B) and the general rule collapses into the short one. Cards dealt without replacement are the standard case where it does not collapse: P(two aces) = (4/52) × (3/51) = 1/221, because the second probability has to know what the first draw removed.
Turning it around: Bayes' rule
P(A | B) and P(B | A) are different numbers, and treating them as the same one is the most expensive mistake in applied probability. A screening test that catches 99% of real cases has told you P(positive | ill). The person holding the positive result wants P(ill | positive). Bayes' rule converts one into the other:
P(A | B) = P(B | A) × P(A) / P(B)
The numerator is the general multiplication rule read backwards. The denominator is the part that usually needs work, since P(B) is rarely handed to you. It comes from the law of total probability: an event can be reached along several disjoint routes, and its overall probability is the sum of those routes.
P(B) = P(B | A) × P(A) + P(B | not A) × P(not A)
Positive results arrive along two routes: ill people the test catches, and healthy people it flags anyway. Add the two and you have every positive result there is. The survey table shows the same sum recovering a number you could also have read straight off it: P(cycles) = .48 × .50 + .22 × .50 = .35. Bayes then answers the reversed question, P(under 30 | cycles) = .48 × .50 / .35 = .686, which is the 48 of 70 cyclists you can count in the first column.
Set out as one line, Bayes' rule looks like a formula to be memorized. Counting people instead makes the answer obvious, and that is all the tree below does.
🎮 The Base-Rate Tree
A cohort of people splits by whether they have the condition, then by what the test says about them. The bar underneath collects every positive result the test produces and divides it into the ones that are right and the ones that are not, which is the answer the person holding a positive letter actually wants. Nothing here is simulated: every count is exact.
At the defaults the tree holds a good test, right 99% of the time in both directions, applied to a condition that affects 1 person in 1,000. Of 100,000 people it correctly flags 99 of the 100 who are ill, and it also flags 999 of the 99,900 who are not, so barely 9% of the flagged group turns out to be ill. Nothing is wrong with the test. False positives outnumber true ones because there are a thousand times more healthy people available to produce them, and this is why screening programs report positive predictive value rather than accuracy.
Slide the prevalence up and the same test becomes trustworthy: at 1 in 10 it reaches 91.7%, and at 1 in 5 it reaches 96.1%. The test never changed. Only the population it was pointed at did, which is the argument for screening the people at risk rather than everybody. Bayesian reasoning goes much further than one 2 × 2 table, and Bayesian thinking in Stats 3 picks it up as a way of doing inference.
Three problems worth knowing
The Chevalier's two bets. Antoine Gombaud, a seventeenth-century writer with a taste for gambling, backed at least one six in four throws of a die and did well; he then backed at least one double six in twenty-four throws of two dice and did badly. He expected the bets to behave alike, since 24 is to 36 as 4 is to 6. The complement rule decides it. P(at least one six in 4 throws) = 1 − (5/6)⁴ = .5177, a bet worth taking; P(at least one double six in 24 throws) = 1 − (35/36)²⁴ = .4914, a bet worth declining. The difference is about 3 percentage points, quite enough to notice over a long season. The correspondence between Pascal and Fermat that his question set off in 1654 is where a good deal of probability theory begins.
The birthday problem. In a room of 23 people, the probability that at least two share a birthday is .5073, near enough a coin flip. The complement rule again: the probability that all 23 birthdays differ is (365/365) × (364/365) × … × (343/365) = .4927, and 1 minus that is the answer. Intuition fails because it answers a different question. You are not comparing your birthday against 22 others, you are comparing every pair against every other, and 23 people make C(23, 2) = 253 pairs. Counting pairs rather than people turns an implausible claim into an even bet, and 50 people take it to .9704.
The prosecutor's fallacy. P(the evidence | innocent) is not P(innocent | the evidence), and a courtroom that treats them as one number arrives confidently at the wrong answer. Suppose one person in a million matches some forensic description. That is P(matches | innocent). On its own it says nothing about P(innocent | matches), which also depends on how many people could have matched in the first place; in a city of five million, several innocent people will. Two convictions later overturned on appeal, those of Sally Clark in England and Lucia de Berk in the Netherlands, rested in part on probability arguments that statisticians criticized on exactly these grounds, and in the first case the Royal Statistical Society wrote publicly about the evidence heard at trial. The same reversal of a conditional sits underneath the replication crisis: a p-value reports P(data this extreme | no effect), and the rate at which published findings are false positives is a different and larger number.
Why it matters: every p-value, confidence level, and sampling distribution is a probability statement. "5% of intervals miss" and "p < 0.05" only mean something because of the long-run logic you just watched unfold.
Three practice problems run on this lesson: Problem 5 reads all four kinds of probability off the survey table above, Problem 13 works the general addition rule on a two-way count, and Problem 14 builds a screening tree from scratch.
Common questions
What is the difference between independent and mutually exclusive events?
Independent events don't influence each other: knowing one happened tells you nothing about the other (two separate coin flips), and P(A and B) = P(A) × P(B). Mutually exclusive events can't both happen (one die roll can't be both a 1 and a 2), so P(A or B) = P(A) + P(B). They're near-opposites: mutually exclusive events are maximally dependent, since one happening rules the other out.
What is the gambler's fallacy?
The belief that after a run of heads, tails is "due." It isn't — each flip is independent, and the coin has no memory. The Law of Large Numbers says the long-run proportion converges to the truth; it never promises short-run correction. The lopsided early flips just get diluted by the thousands that follow.
How do I tell whether a question wants me to add or to multiply?
Read the connector first. An "or" question asks for a union and points at addition; an "and" question asks for two things happening together and points at multiplication. Then check which version of the rule you are entitled to. For "or", the short form P(A) + P(B) is legal only when the two events cannot both occur; otherwise the overlap has to come back out. For "and", the short form P(A) × P(B) is legal only when the events are independent; otherwise the second factor is P(B | A). Two habits catch most of the errors. If an answer lands above 1, an overlap was counted twice somewhere. And "at least one" is an "or" question wearing a disguise, nearly always quicker through the complement: work out the probability that it never happens, which is a multiplication, then subtract from 1.