This site is a work in progress. New lessons are added regularly. Contact us

Introduction to Probability

Learning goals

  • Treat an event as a subset of the sample space
  • Divide favorable by total when outcomes are equally likely
  • Apply the complement rule for at least one
  • Subtract the overlap in the addition rule
  • Shrink the sample space to compute P(AB)P(A \mid B)
  • Separate mutually exclusive from independent, which conflict

Events are sets, and probability counts them

An experiment is any procedure whose result is uncertain. The set of all possible results is the sample space, written SS, and one element of SS is an outcome. An event is any subset of the sample space:

AS.A \subseteq S.

That single word, subset, is the whole level-up. Once events are sets, the set operations you know already become the ways of combining events, and they translate straight into English:

Now attach a number to each set. Write A\lvert A \rvert for the number of outcomes in AA. If the sample space is finite and its outcomes are equally likely, then

P(A)=AS.P(A) = \frac{\lvert A \rvert}{\lvert S \rvert}.

Three facts fall out immediately, with no work. Since 0AS0 \le \lvert A \rvert \le \lvert S \rvert, every probability satisfies 0P(A)10 \le P(A) \le 1. The impossible event has P()=0P(\emptyset) = 0 because =0\lvert \emptyset \rvert = 0. The certain event has P(S)=1P(S) = 1 because the quotient S/S\lvert S \rvert / \lvert S \rvert equals 11.

What “equally likely” actually claims

Read that definition again and notice where the mathematics stops. The formula does not prove that a coin is fair; it assumes it. “Equally likely” is a claim about the world, not a theorem, and no amount of algebra can establish it. A physical die might be weighted, a shuffled deck might be badly shuffled, and a “random” sample of people might quietly exclude everyone without a phone. What mathematics gives you is a conditional promise: if the outcomes of SS are equally likely, then P(A)P(A) is the fraction of them lying in AA. Checking the if is your job, and it is done with physics, with care in the design of the experiment, or with data.

The assumption is also delicate, because the same experiment has many sample spaces and usually only one of them is equally likely. Roll two dice and record the sum. The possible results are

S={2,3,4,5,6,7,8,9,10,11,12},S' = \{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12\},

which has 1111 outcomes. If you now “count and divide” you get P(sum=2)=111P(\text{sum} = 2) = \tfrac{1}{11}, and that is simply wrong. The eleven sums are not equally likely: only (1,1)(1,1) makes a 22, while six different rolls make a 77. The sample space that is equally likely is the set of 3636 ordered pairs, because each die is fair. The multiplication principle from the previous lesson counts 6×6=366 \times 6 = 36 of them. So P(sum=2)=136P(\text{sum} = 2) = \tfrac{1}{36}. Choosing the right sample space is the modelling step, and it is where most probability errors are born.

One note on notation before we start. In this chapter the letter PP is taken: P(A)P(A) means the probability of the event AA. So we write combinations as (nk)\binom{n}{k}, exactly as in the binomial theorem, and we spell permutation counts out as products such as 10×9×810 \times 9 \times 8 rather than overloading PP.

A picture to hold on to

Every rule below is a statement about how the sets overlap, so draw the sets. Take a single card drawn from a standard 5252-card deck. Let AA be “the card is a heart” (1313 cards) and let BB be “the card is a face card”, meaning a jack, queen, or king (1212 cards). Three cards are in both: the jack, queen, and king of hearts.

Hearts and face cards as overlapping sets in a 52-card deckTwo overlapping circles inside a rectangle. A (hearts) contains 10 cards alone, B (face cards) contains 9 cards alone, their overlap contains 3 cards, and 30 cards sit outside both.A: heartsB: face cards103930S: 52 cards
One card from a 52-card deck. A is the 13 hearts, B is the 12 face cards, and the 3 cards in the middle (the jack, queen, and king of hearts) belong to both. Adding 13 and 12 counts those 3 cards twice, which is the whole reason the addition rule subtracts them.

The complement rule

The first rule is the cheapest and the most useful.

P(Ac)=1P(A)P(A^{c}) = 1 - P(A)#

Every outcome of the experiment lies either in AA or outside it, and never in both places at once. So the outcomes of SS split cleanly into the ones inside AA and the ones inside AcA^{c}, which means the counts add:

A+Ac=S.\lvert A \rvert + \lvert A^{c} \rvert = \lvert S \rvert.

Divide every term by S\lvert S \rvert. The left side becomes P(A)+P(Ac)P(A) + P(A^{c}) and the right side becomes 11, so

P(A)+P(Ac)=1,P(A) + P(A^{c}) = 1,

and subtracting P(A)P(A) from both sides gives P(Ac)=1P(A)P(A^{c}) = 1 - P(A).

The rule is worth more than its size suggests, because of one recurring phrase: at least one. The event “at least one success” is a sprawling union of many cases (exactly one, exactly two, and so on up). But its complement is a single tidy event: “no successes at all”. Counting the tidy one and subtracting from 11 is called complementary counting, and for “at least one” problems it is almost always the short road.

Worked example 1 At least one six in four rolls

A fair die is rolled four times. What is the probability of getting at least one six?

Start by pinning down an equally likely sample space. A result is an ordered list of four faces, so by the multiplication principle

S=6×6×6×6=64=1296,\lvert S \rvert = 6 \times 6 \times 6 \times 6 = 6^4 = 1296,

and every one of those 12961296 lists is equally likely because the die is fair.

Now let AA be “at least one six”. Attacking AA head on means splitting into exactly one six, exactly two sixes, exactly three, and exactly four, which is four separate counts. Its complement AcA^{c} is “no six at all”, and that is one count: each of the four rolls must land on one of the five non-six faces, so

Ac=5×5×5×5=54=625.\lvert A^{c} \rvert = 5 \times 5 \times 5 \times 5 = 5^4 = 625.

Therefore P(Ac)=6251296P(A^{c}) = \dfrac{625}{1296}, and the complement rule finishes it:

P(A)=16251296=67112960.518.P(A) = 1 - \frac{625}{1296} = \frac{671}{1296} \approx 0.518.

So a run of four rolls produces a six slightly more often than not, about 51.8%51.8\% of the time. Notice that no rule beyond counting was used: the whole computation is Ac/S\lvert A^{c} \rvert / \lvert S \rvert and one subtraction.

The addition rule

Now the union. The naive guess, P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B), is wrong in general, and the Venn diagram above shows exactly why: adding 1313 hearts to 1212 face cards counts the three face-card hearts twice. Fixing that overcount is the entire content of the rule.

P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B)#

Count AB\lvert A \cup B \rvert by hand. An outcome in the union sits in exactly one of three regions: in AA but not BB, in both, or in BB but not AA. Write those three counts as aa, mm, and bb (the 1010, 33, and 99 in the picture). Then

A=a+m,B=m+b,AB=a+m+b.\lvert A \rvert = a + m, \qquad \lvert B \rvert = m + b, \qquad \lvert A \cup B \rvert = a + m + b.

Add the first two:

A+B=(a+m)+(m+b)=(a+m+b)+m=AB+AB,\lvert A \rvert + \lvert B \rvert = (a + m) + (m + b) = (a + m + b) + m = \lvert A \cup B \rvert + \lvert A \cap B \rvert,

because m=ABm = \lvert A \cap B \rvert. Every outcome of the overlap was counted once as a member of AA and once again as a member of BB. So each such outcome was counted twice, and the identity records that. Rearranging,

AB=A+BAB.\lvert A \cup B \rvert = \lvert A \rvert + \lvert B \rvert - \lvert A \cap B \rvert.

Divide through by S\lvert S \rvert:

P(AB)=P(A)+P(B)P(AB).P(A \cup B) = P(A) + P(B) - P(A \cap B).

This is inclusion and exclusion: include each set, then exclude what you double counted.

The familiar “just add them” rule is not a second rule; it is this one with a zero in it. Call AA and BB mutually exclusive (or disjoint) when they cannot both happen, which is to say when the intersection is empty, AB=A \cap B = \emptyset. Then P(AB)=0P(A \cap B) = 0, the correction term vanishes, and

P(AB)=P(A)+P(B)when AB=.P(A \cup B) = P(A) + P(B) \qquad \text{when } A \cap B = \emptyset.

Keep that as a consequence, not as a separate fact to memorise. The general rule is the one to hold, and the special case is what it collapses to when the circles do not touch.

Worked example 2 A heart or a face card

One card is drawn at random from a standard deck. What is the probability it is a heart or a face card?

The word “or” is a union, so use the addition rule with AA the hearts and BB the face cards. The deck gives the three counts directly:

P(A)=1352,P(B)=1252,P(AB)=352,P(A) = \frac{13}{52}, \qquad P(B) = \frac{12}{52}, \qquad P(A \cap B) = \frac{3}{52},

since exactly three cards (the jack, queen, and king of hearts) are both. Now apply the rule:

P(AB)=1352+1252352=2252=11260.423.P(A \cup B) = \frac{13}{52} + \frac{12}{52} - \frac{3}{52} = \frac{22}{52} = \frac{11}{26} \approx 0.423.

Check it against the picture, which is the point of drawing it: the union holds 10+3+9=2210 + 3 + 9 = 22 cards, so P(AB)=2252P(A \cup B) = \tfrac{22}{52} as well. Had you forgotten to subtract, you would have claimed 2525 favourable cards, three more than exist.

Check your understanding

Two events satisfy P(A)=0.5P(A) = 0.5, P(B)=0.4P(B) = 0.4, and P(AB)=0.1P(A \cap B) = 0.1. What is P(AB)P(A \cup B)?

Answer choices

Conditional probability: shrink the sample space

Here is the idea that makes probability powerful rather than merely tidy. Suppose you learn that the event BB has happened. That information does not change the experiment, but it changes what is still possible: every outcome outside BB is now ruled out. So throw them away. Your sample space is no longer SS; it is BB.

Inside this smaller world, which outcomes still make AA happen? Exactly the ones that were in AA and in BB, that is, the outcomes of ABA \cap B. The outcomes of BB were equally likely before and nothing has disturbed them, so count and divide as always:

P(AB)=ABB.P(A \mid B) = \frac{\lvert A \cap B \rvert}{\lvert B \rvert}.

Read P(AB)P(A \mid B) as “the probability of AA given BB”. To turn that count into probabilities, divide the top and the bottom by S\lvert S \rvert, which changes nothing:

P(AB)=AB/SB/S=P(AB)P(B).P(A \mid B) = \frac{\lvert A \cap B \rvert / \lvert S \rvert}{\lvert B \rvert / \lvert S \rvert} = \frac{P(A \cap B)}{P(B)}.

That is the definition of conditional probability, and it was forced on us: it is what “shrink the sample space to BB” says in the language of PP. It also comes with a condition. The formula divides by P(B)P(B), so it requires

P(B)>0.P(B) > 0.

That is not a technicality to shrug at. Conditioning on an impossible event is meaningless, because “given BB” means “restrict attention to the outcomes of BB”, and there are none to restrict to.

Conditioning on a sum of 8 shrinks the sample space from 36 cells to 5A 6 by 6 grid of two-dice outcomes. The five cells summing to 8 are outlined as the new sample space, and the two of them containing a 3 are filled.Die 2Die 1123456123456
Two fair dice give 36 equally likely cells. Learning that the sum is 8 discards every cell but the 5 outlined ones, so the sample space shrinks to those 5. Two of them contain a 3, so the probability of a 3 given a sum of 8 is 2 out of 5, not the 11 out of 36 it was before.

Worked example 3 Given the sum is 8, did a die show a 3?

Two fair dice are rolled. Given that the sum is 88, what is the probability that at least one die shows a 33?

Let BB be “the sum is 88” and let AA be “at least one die shows a 33”. List BB from the grid:

B={(2,6), (3,5), (4,4), (5,3), (6,2)},B=5.B = \{(2,6),\ (3,5),\ (4,4),\ (5,3),\ (6,2)\}, \qquad \lvert B \rvert = 5.

Of those five outcomes, the ones that also lie in AA are (3,5)(3,5) and (5,3)(5,3), so AB=2\lvert A \cap B \rvert = 2. Shrinking the sample space to BB gives

P(AB)=ABB=25=0.4.P(A \mid B) = \frac{\lvert A \cap B \rvert}{\lvert B \rvert} = \frac{2}{5} = 0.4.

The formula in terms of probabilities agrees, as it must, since both routes are the same division:

P(AB)=P(AB)P(B)=2/365/36=25.P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{2/36}{5/36} = \frac{2}{5}.

Compare this with the unconditional probability. Out of all 3636 rolls, 1111 contain a three, so P(A)=11360.306P(A) = \tfrac{11}{36} \approx 0.306. Learning the sum pushed the chance of a three up from about 31%31\% to 40%40\%, which is what it means for the information to be worth something.

Worked example 4 A test that is right almost every time, and an answer that is still tiny

A disease affects 11 person in 10001000. A screening test detects the disease in 99%99\% of the people who have it. Among people who do not have it, the test still comes back positive 5%5\% of the time. Your test comes back positive. What is the probability that you have the disease?

The clean way to see this is to turn the percentages back into counts, because counts are what probability is made of. Imagine 100,000100{,}000 people and follow them through.

The disease affects one in a thousand, so 100100 of them are sick and the remaining 99,90099{,}900 are healthy. Among the 100100 sick people the test catches 99%99\%, giving 9999 positives. Among the 99,90099{,}900 healthy people it wrongly fires 5%5\% of the time, giving

0.05×99,900=49950.05 \times 99{,}900 = 4995

positives. So the total number of positive tests is 99+4995=509499 + 4995 = 5094, and the number of positive tests belonging to someone who is genuinely sick is 9999. Now condition: a positive result shrinks the sample space from all 100,000100{,}000 people to those 50945094, and inside that world you want the sick ones.

P(sickpositive)=995094=115660.019.P(\text{sick} \mid \text{positive}) = \frac{99}{5094} = \frac{11}{566} \approx 0.019.

Under 2%2\%. The test is not broken and the arithmetic is not a trick. The reason is that the false positives are drawn from an enormous healthy population, while the true positives are drawn from a tiny sick one. So even a small error rate on the big group swamps a near-perfect hit rate on the small one. Confusing P(positivesick)=0.99P(\text{positive} \mid \text{sick}) = 0.99 with P(sickpositive)0.019P(\text{sick} \mid \text{positive}) \approx 0.019 is the single most expensive mistake in applied probability, and the two numbers are not even close.

Check your understanding

A single card is drawn from a standard deck. Given that the card is a heart, what is the probability that it is a face card?

Answer choices

The multiplication rule and independence

Multiply both sides of the conditional definition by P(B)P(B) and you have a rule for intersections:

P(AB)=P(B)P(AB).P(A \cap B) = P(B) \cdot P(A \mid B).

This is the multiplication rule, and it says something obvious once you hear it. For both events to happen, BB must happen (probability P(B)P(B)), and then, in the world where it did, AA must happen (probability P(AB)P(A \mid B)). It is how you handle any experiment done in stages, such as drawing two cards one after the other.

Now ask a sharper question. What if learning BB tells you nothing at all about AA? Then the conditional probability is no different from the plain one:

P(AB)=P(A).P(A \mid B) = P(A).

Substitute that into the multiplication rule and the conditional vanishes:

P(AB)=P(A)P(B).P(A \cap B) = P(A) \cdot P(B).

We take this last equation as the definition: AA and BB are independent exactly when P(AB)=P(A)P(B)P(A \cap B) = P(A)P(B). Two reasons to prefer the product form. It is symmetric in AA and BB, so it cannot pretend that independence is a one-way street: if BB says nothing about AA then AA says nothing about BB. And it still makes sense when P(B)=0P(B) = 0, where P(AB)P(A \mid B) is not even defined.

Independence is a numerical condition. You do not decide it by staring at the two events and feeling that they seem unrelated; you compute both sides and compare.

Worked example 5 Two draws, with and without replacement

Two cards are drawn from a standard deck. Find the probability that both are hearts, first when the first card is put back and the deck reshuffled, and then when it is not.

With replacement. The deck is identical for the second draw, so knowing the first card tells you nothing about the second. The conditional probability P(2nd is a heart1st is a heart)P(\text{2nd is a heart} \mid \text{1st is a heart}) is still 1352=14\tfrac{13}{52} = \tfrac{1}{4}, the same as the unconditional value. The two events are independent, and the product form applies:

P(both hearts)=1414=116=0.0625.P(\text{both hearts}) = \frac{1}{4} \cdot \frac{1}{4} = \frac{1}{16} = 0.0625.

Without replacement. Now the first card is gone. If it was a heart, only 1212 hearts remain among 5151 cards, so

P(2nd is a heart1st is a heart)=1251,P(\text{2nd is a heart} \mid \text{1st is a heart}) = \frac{12}{51},

which is not 14\tfrac{1}{4}. Use the general multiplication rule, not the product form:

P(both hearts)=13521251=141251=12204=1170.0588.P(\text{both hearts}) = \frac{13}{52} \cdot \frac{12}{51} = \frac{1}{4} \cdot \frac{12}{51} = \frac{12}{204} = \frac{1}{17} \approx 0.0588.

The two answers differ, and they differ in the direction you would expect: removing a heart makes a second heart slightly harder. Independence held in the first setup and failed in the second, and the only thing that changed was whether the card went back.

Independence can also show up where you did not expect it. Draw one card and let AA be “the card is a heart” and BB be “the card is a king”. Then ABA \cap B is the single king of hearts, so

P(AB)=152,P(A)P(B)=1352452=14113=152.P(A \cap B) = \frac{1}{52}, \qquad P(A)P(B) = \frac{13}{52} \cdot \frac{4}{52} = \frac{1}{4} \cdot \frac{1}{13} = \frac{1}{52}.

They match, so suit and rank are independent. The reason is visible in the deck itself: every rank comes in exactly one card of each suit. So learning the rank leaves the four suits in the same proportions as before. Knowing you hold a king tells you nothing about the suit.

Mutually exclusive is not the same as independent

Two events, two relations, and they get confused constantly. They are not the same relation, and they are not even close: in the interesting cases they are near opposites.

Now watch what mutual exclusivity actually does to your information. If AA and BB cannot both happen and someone tells you that BB happened, you have learned a great deal about AA. You have learned that AA definitely did not happen. Far from being uninformative, BB is as informative as an event can be. That is the exact opposite of independence, and the algebra confirms it.

Mutually exclusive events with positive probability are never independent#

Suppose AB=A \cap B = \emptyset and suppose both events have positive probability, P(A)>0P(A) > 0 and P(B)>0P(B) > 0. Because AA and BB are disjoint, their intersection is the impossible event, so

P(AB)=P()=0.P(A \cap B) = P(\emptyset) = 0.

But P(A)P(A) and P(B)P(B) are both strictly positive, and a product of two positive numbers is positive:

P(A)P(B)>0.P(A) \cdot P(B) > 0.

So P(AB)=0P(A \cap B) = 0 while P(A)P(B)>0P(A)P(B) > 0, and the two are therefore different. The defining equation of independence fails, and AA and BB are dependent.

The conditional probability shows how dependent. Since P(B)>0P(B) > 0, we may condition on BB, and

P(AB)=P(AB)P(B)=0P(B)=0,P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{0}{P(B)} = 0,

while P(A)>0P(A) > 0. Learning that BB occurred does not nudge the probability of AA; it collapses it to zero.

Reading the same argument backwards gives the other half. If AA and BB are independent with P(A)>0P(A) > 0 and P(B)>0P(B) > 0, then P(AB)=P(A)P(B)>0P(A \cap B) = P(A)P(B) > 0, so ABA \cap B contains at least one outcome and cannot be empty. Independent events of positive probability must overlap.

So the two relations do not merely differ; for events that can actually happen, each one rules the other out. The picture is the fastest way to remember it: mutually exclusive events are drawn as separate circles. Independent events of positive probability are drawn as overlapping ones, with the overlap sized so that P(AB)=P(A)P(B)P(A \cap B) = P(A)P(B).

Mutually exclusive versus independentLeft panel: disjoint circles, probability of the intersection is zero. Right panel: overlapping circles, probability of the intersection is the product of the two probabilities and is positive.ABMutually exclusiveP(A and B) = 0ABIndependentP(A and B) = P(A)P(B) > 0
Mutually exclusive events cannot overlap, so P(A and B) = 0 and each event rules the other out. Independent events with positive probability are forced to overlap, because their intersection has probability P(A)P(B), which is greater than zero. But an overlap alone does not make events independent: the overlap has to be exactly the right size.

Make it concrete with one card. Let AA be “the card is a heart” and BB be “the card is a spade”. A card cannot be both, so they are mutually exclusive, and P(AB)=0P(A \cap B) = 0. But

P(A)P(B)=1414=1160,P(A)P(B) = \frac{1}{4} \cdot \frac{1}{4} = \frac{1}{16} \ne 0,

so they are not independent. And of course they are not: if you are told the card is a spade, the chance it is a heart drops from 14\tfrac{1}{4} to 00. Compare that with the heart-and-king pair from the last section, which does overlap (in the king of hearts) and is independent. Same deck, two pairs of events, opposite behaviour.

The one honest exception

Can two events be both mutually exclusive and independent? Yes, but only in a degenerate way, and it is worth stating precisely because it is the boundary case the proof above deliberately excluded.

Suppose AA and BB are mutually exclusive. Then they are independent exactly when P(A)=0P(A) = 0 or P(B)=0P(B) = 0. Both directions are quick. If they are mutually exclusive and independent, then P(A)P(B)=P(AB)=0P(A)P(B) = P(A \cap B) = 0, and a product of real numbers is zero only when one of its factors is zero. Conversely, if they are mutually exclusive and (say) P(A)=0P(A) = 0, then P(AB)=0P(A \cap B) = 0 and P(A)P(B)=0P(B)=0P(A)P(B) = 0 \cdot P(B) = 0 as well, so the two sides agree and the events are independent.

In a finite sample space of equally likely outcomes, P(A)=0P(A) = 0 forces A=A = \emptyset. So the only way to be both mutually exclusive and independent is for one of the events to be impossible. That case is a fact about nothing rather than a useful example. For any two events that can actually occur, the two conditions exclude each other.

Check your understanding

Events AA and BB satisfy P(A)=0.3P(A) = 0.3, P(B)=0.5P(B) = 0.5, and AB=A \cap B = \emptyset. Which statement is true?

Answer choices

Probability when the counts get big

Nothing in P(A)=A/SP(A) = \lvert A \rvert / \lvert S \rvert requires the counts to be small. When the sample space is a set of hands, committees, or arrangements, the counting principles from the previous lesson supply both the numerator and the denominator. The probability is then their quotient. A five-card hand is a set of cards, since the order you are dealt them does not change the hand, so hands are counted with combinations.

Worked example 6 Exactly two aces in a five-card hand

Five cards are dealt from a standard deck. What is the probability the hand contains exactly two aces?

The sample space is every possible five-card hand, and all of them are equally likely because the deck is shuffled:

S=(525)=2,598,960.\lvert S \rvert = \binom{52}{5} = 2{,}598{,}960.

Now count the hands in the event. Building one means making two choices in sequence: pick which two of the four aces are in the hand, then pick the other three cards from the 4848 non-aces. Multiply the two counts, and note that all three of those cards must be non-aces, or the hand would hold more than two aces.

A=(42)(483)=6×17,296=103,776.\lvert A \rvert = \binom{4}{2} \binom{48}{3} = 6 \times 17{,}296 = 103{,}776.

Divide:

P(A)=103,7762,598,9600.0399.P(A) = \frac{103{,}776}{2{,}598{,}960} \approx 0.0399.

About 4%4\% of hands, or one in every twenty-five or so. The formula never changed; only the size of the counts did.

The birthday problem

Probability earns its reputation for being counter-intuitive on questions like this one. In a room of 2323 people, what is the probability that at least two of them share a birthday?

Most people guess something small, on the order of a few percent. The true answer is just over one half. Here is the full computation. Assume 365365 days, ignore leap years and seasonal effects, and take a person’s birthday to be equally likely to be any day. An outcome is an assignment of one day to each of the 2323 people, so the multiplication principle gives

S=36523,\lvert S \rvert = 365^{23},

and all of these are equally likely. The event “at least two share” is a nightmare to count head on: two people might share, or three, or two separate pairs might match. So take the complement, exactly as with “at least one six”. Let DD be the event that all 2323 birthdays are different. Counting DD is a one-liner, because you assign the days one person at a time and each new person must dodge every day already used:

D=365×364×363××343,\lvert D \rvert = 365 \times 364 \times 363 \times \cdots \times 343,

a product of 2323 falling factors. Therefore

P(D)=365×364××343365230.4927,P(D) = \frac{365 \times 364 \times \cdots \times 343}{365^{23}} \approx 0.4927,

and the complement rule finishes the job:

P(at least two share)=1P(D)10.4927=0.5073.P(\text{at least two share}) = 1 - P(D) \approx 1 - 0.4927 = 0.5073.

Just over 50%50\%, so in a room of 2323 a shared birthday is more likely than not.

Probability of a shared birthday against the number of peopleBars at 10, 20, 23, 30, 40, 50, and 60 people, rising from about 12 percent to about 99 percent, crossing the dashed 50 percent line at 23 people.chance of a shared birthday (percent)05010050.710202330405060number of people
The probability that at least two people in a room share a birthday, as the room fills up. It passes one half at 23 people (the dashed line) and is already above 97 percent at 50, long before the 366 people needed to make a match certain.

Why does the answer feel so wrong? Because most people silently answer a different question: “does anyone here share my birthday?” That one really is unlikely. Among 2222 other people, the chance that none matches your day is (364365)220.941\left(\tfrac{364}{365}\right)^{22} \approx 0.941, so the chance someone does is only about 5.9%5.9\%, and your intuition was right about that.

The question actually asked is not about you. It is about every pair of people in the room, and pairs are counted with combinations:

(232)=23×222=253.\binom{23}{2} = \frac{23 \times 22}{2} = 253.

Two hundred and fifty-three chances for a match, not twenty-two. Each pair matches with probability 1365\tfrac{1}{365}, and 253×13650.69253 \times \tfrac{1}{365} \approx 0.69. Read that number carefully, because it is not a probability. It is a count: roughly how many matching pairs you would expect a room of 2323 to turn up. Nothing stops such a count from passing 11, and in a room of 3030 it already has, at (302)/3651.19\binom{30}{2} / 365 \approx 1.19. So it cannot be the answer, and neither of the two shortcuts will convert it into one.

The reasons the shortcuts fail are different, and this lesson is precisely about not confusing them. You cannot add the 253253 pair probabilities, because the pair events overlap: several pairs can match at once, and adding would count those rooms many times over. That is the addition rule talking, and what it demands is disjointness, which these events plainly do not have. Separately, you cannot multiply the 253253 misses either, because the pairs are not independent. If Ann and Bob share a birthday and Bob and Cara share a birthday, then Ann and Cara match automatically, so the pair events carry information about one another.

The exact count of DD above remains the proof. The pair count is only here to explain why a match is not the long shot it feels like. The room grows one person at a time, but the pairs grow roughly like the square of the room.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

A gambler at the dice tables of Paris thought the dice were cheating him. Betting on at least one six in four rolls of one die paid him, over thousands of evenings. Betting on at least one double six in twenty four rolls of two dice did not. The two wagers looked identical to him. Four rolls against six faces should surely match twenty four rolls against thirty six pairs.

In 1654 he took the paradox to Blaise Pascal, a young French geometer. Pascal passed it to Pierre de Fermat, a judge who did mathematics in his spare hours. Their letters crossed the country all that summer, and the mathematics of chance was assembled inside them. Neither man published a treatise about it. They also settled a question nobody had answered honestly before, how to divide the stake of a game abandoned half played.

The complement rule you proved here finishes the gambler’s paradox in one line. His first bet wins with probability 1(5/6)40.5181 - (5/6)^4 \approx 0.518, and his second with 1(35/36)240.4911 - (35/36)^{24} \approx 0.491. One sits just above a half and the other just below. Nobody could feel a gap that narrow across a few evenings of play. The answer had to wait for someone willing to count the losing outcomes instead.