Probability and statistics · Part 1 of 5
Probability basics
Probability basics: sample spaces, events, the probability axioms, and computing probabilities of simple and compound events.
Probability and statistics17 min read
You flip a coin, roll a die, draw a card. Will it land heads? Will it be a six? Probability is the branch of math that turns vague questions like "how likely?" into precise numbers between and , so you can compare risks, compute expected winnings, and reason about uncertainty instead of guessing.
This lesson builds the foundation: what a sample space is, how to assign probabilities, and how to combine events with "or," "and," and "not." Everything later in this module — conditional probability, distributions, inference — rests on these rules.
Sample spaces and events
A random experiment is any process whose outcome cannot be predicted with certainty, like rolling a die. The sample space is the set of all possible outcomes. For one die roll, .
An event is any subset of the sample space — a collection of outcomes you care about. "Roll an even number" is the event . An event occurs when the actual outcome belongs to it.
Getting the sample space right is most of the work. For two coins, the sample space is — four equally likely outcomes, not three. Order matters here because (first coin heads) and (second coin heads) are different outcomes even though both show "one head."
Example 1. Listing a sample space Two coins are flipped. List the sample space and the event "exactly one head."
Each coin has two outcomes, so list all pairs:
The event "exactly one head" collects the outcomes with one :
There are favorable outcomes out of equally likely ones, so .
Assigning probabilities
A probability measure assigns to each event a number satisfying three rules (the axioms):
- for every event .
- : something must happen.
- If events and cannot both happen (they are disjoint, meaning ), then .
From these, two facts follow immediately. The complement rule: . And for a finite sample space with equally likely outcomes, the probability of an event is just a ratio of counts:
This "counting" formula is the workhorse for dice, cards, and coins. It is valid only when all outcomes are equally likely — that assumption is part of the model, not a law of nature.
Example 2. A die roll A fair die is rolled. What is the probability of rolling a number greater than ?
The sample space has equally likely outcomes.
The event is , which has outcomes.
As a check, the complement is with probability , and . ✓
Combining events: or, and, not
For any two events and :
- Not (complement): .
- or (union): . The subtraction removes the overlap, which would otherwise be counted twice.
- and (intersection): — in general you cannot compute this from and alone. A special case: if and are independent (one gives no information about the other), then .
Two events are mutually exclusive when , so and the union formula collapses to . Do not confuse "mutually exclusive" with "independent": mutually exclusive events (like rolling a and rolling a ) are strongly dependent — if one happens, the other cannot.
Example 3. Union with overlap A card is drawn from a standard -card deck. What is the probability it is a heart or a face card (jack, queen, king)?
There are hearts, so .
There are face cards per suit times suits face cards, so .
The overlap is the face cards that are hearts, so .
Independent events
Events and are independent when knowing that happened does not change the probability of ; formally, . Physical independence — separate coins, separate die rolls, replacement draws — usually justifies assuming independence.
For a sequence of independent events, multiply the probabilities. The probability that two fair coins both come up heads is , which matches the count: is of outcomes.
The complement rule plus independence is a classic combination: the probability of "at least one" success equals minus the probability that every attempt fails. For independent attempts each succeeding with probability :
Example 4. At least one six A fair die is rolled times. What is the probability of getting at least one six?
Work with the complement: "at least one six" fails only if all three rolls are not a six.
Each roll is not a six with probability , and the rolls are independent.
Check: this is bigger than ? A single roll gives , and three rolls should do better — is plausible. ✓
A worked problem from start to finish
Here is a problem that uses several tools at once. Two fair dice are rolled. What is the probability that the sum is or at least one die shows a ?
First, the sample space: equally ordered pairs .
Event 1: sum is . The pairs are — outcomes, so .
Event 2: at least one . Count pairs with a in the first slot (), a in the second slot (), minus the double-counted : outcomes, so .
Overlap: sum is and a appears: and — outcomes, .
Now the union rule:
The habit of counting the overlap before adding is what keeps this kind of answer honest.
Example 5. Sum of two dice Two fair dice are rolled. What is the probability the sum is or at least one die shows a ?
Sample space: ordered pairs.
Sum : pairs, probability .
At least one : pairs, probability .
Both: and , pairs, probability .
When counting is not equal: weighted outcomes
The ratio formula needs equally likely outcomes. When they are not, assign a probability to each outcome directly, with all the weights summing to , and get an event's probability by adding the weights of its outcomes.
For example, a biased spinner lands on red with probability , blue with probability , and green with probability . The probability of "not green" is , and the probability of "red or blue" is (these are disjoint, so the weights just add).
A useful sanity check on any probability model: every outcome weight must be nonnegative, and the weights must total exactly . If they do not, you have described something that is not a probability.
Example 6. A weighted spinner A spinner lands on red with probability , blue with probability , and green with probability . What is the probability it lands on red or green?
Red and green are disjoint outcomes, so add their weights.
Check via the complement: , and . ✓
Common mistakes
- Treating "two heads" in two coin flips as one outcome: the sample space is {HH, HT, TH, TT} with four equally likely outcomes, so P(two heads) = 1/4, not 1/3.
- Adding P(A) + P(B) for "A or B" without subtracting the overlap: use P(A ∪ B) = P(A) + P(B) − P(A ∩ B), subtracting only when the overlap is nonzero.
- Assuming mutually exclusive events are independent: if A and B cannot both happen, then P(A ∩ B) = 0, which equals P(A)P(B) only in degenerate cases.
- Computing "at least one" by adding probabilities of each attempt: use 1 − (1 − p)^n for the complement instead.
- Applying the ratio formula to outcomes that are not equally likely: it is valid only when every outcome in the sample space has the same probability.
Practice
- A fair die is rolled once. What is the probability of rolling a number divisible by ? Give your answer as a fraction.
- A card is drawn from a standard -card deck. What is the probability it is a spade or an ace? Give your answer as a fraction.
- Two fair coins are flipped. What is the probability of at least one head? Give your answer as a fraction.
- Two fair dice are rolled. What is the probability that the sum is or both dice show the same number? Give your answer as a fraction.
- A fair coin is flipped times. What is the probability of getting at least one tail? Give your answer as a fraction.
Answers
- , since the favorable outcomes are , which is of the equally likely outcomes.
- : there are spades and aces, with overlap (ace of spades), so .
- , since of the outcomes contain at least one head (equivalently ).
- : sum has pairs, doubles have pairs, and the overlap (doubles summing to , i.e. ) has pair, so .
- , since the complement (all heads) has probability , and .
Next you will see what happens when one event gives information about another: conditional probability and Bayes' theorem.