UniMaths
Free chapterTry everything here: cards, proofs and practice. Sign up free to save your progress and unlock all 7 chapters.Sign up free
PROB1 · 1

Counting and probability

10 concepts · 30 questions

Sample spaces and events, the axioms of probability and their consequences, equally likely outcomes, counting (permutations, combinations), and inclusion–exclusion.

Overview 1The plan of this section

Probability starts by modelling an experiment.

  1. Sample spaces and events (Def. 1.1), the axioms (Def. 1.2) and what follows from them (Prop. 1.3).
  2. When outcomes are equally likely (Prop. 1.4), probability becomes counting: the multiplication principle, permutations and combinations (Prop. 1.5, Prop. 1.6, Technique 1.7).
  3. Inclusion–exclusion (Theorem 1.8) handles "at least one" questions.

Model: outcomes, events, axioms. Equally likely: probability = favourable / total. Then count carefully.

Definition 1.1Sample spaces and events

The sample space Ω\Omega is the set of possible outcomes of an experiment; an event is a subset A⊆ΩA\subseteq\Omega, and "AA happens" means the outcome lies in AA. Set operations describe combined events: A∪BA\cup B (AA or BB), A∩BA\cap B (AA and BB), AcA^c (not AA). A,BA, B are mutually exclusive (disjoint) if A∩B=∅A\cap B = \emptyset. Example: two dice: Ω={1,…,6}2\Omega = \{1, \dots, 6\}^2 has 3636 outcomes; "sum is 77" is {(1,6),(2,5),…,(6,1)}\{(1, 6), (2, 5), \dots, (6, 1)\}.

Ω\Omega = all outcomes; event = subset. "Or" = union, "and" = intersection, "not" = complement. Choose Ω\Omega so outcomes are equally likely when possible (ordered pairs for two dice).

Definition 1.2The axioms of probability

A probability assigns to each event AA a number P(A)\mathbb{P}(A) with: (A1) P(A)≥0\mathbb{P}(A)\ge0; (A2) P(Ω)=1\mathbb{P}(\Omega) = 1; (A3) if A1,A2,…A_1, A_2, \dots are pairwise disjoint then P(⋃iAi)=∑iP(Ai)\mathbb{P}\big(\bigcup_iA_i\big) = \sum_i\mathbb{P}(A_i) (countable additivity).

Three axioms: non-negative, total 11, additive over disjoint events.

Everything else (complements, unions, …) is derived from these.

Proposition 1.3Consequences of the axioms

For all events: (i) P(Ac)=1−P(A)\mathbb{P}(A^c) = 1 - \mathbb{P}(A), so P(∅)=0\mathbb{P}(\emptyset) = 0; (ii) if A⊆BA\subseteq B then P(A)≤P(B)\mathbb{P}(A)\le\mathbb{P}(B), so 0≤P(A)≤10\le\mathbb{P}(A)\le1; (iii) P(A∪B)=P(A)+P(B)−P(A∩B)\mathbb{P}(A\cup B) = \mathbb{P}(A) + \mathbb{P}(B) - \mathbb{P}(A\cap B); (iv) P(A∪B)≤P(A)+P(B)\mathbb{P}(A\cup B)\le\mathbb{P}(A) + \mathbb{P}(B) (union bound).

Complement: P(Ac)=1−P(A)\mathbb P(A^c) = 1 - \mathbb P(A) ("at least one" = 1−1 - "none").

Union: add, subtract the overlap.

Monotone: bigger events are more likely.

Proof

Proposition 1.4Equally likely outcomes

If Ω\Omega is finite and all outcomes are equally likely, then P(A)=∣A∣∣Ω∣\mathbb{P}(A) = \frac{|A|}{|\Omega|}.

Classical probability: favourable outcomes / total outcomes, if they are equally likely. So probability problems become counting problems.

Proof

Proposition 1.5The multiplication principle and permutations

If a choice is made in kk stages with n1,n2,…,nkn_1, n_2, \dots, n_k options at each stage (whatever was chosen before), there are n1n2⋯nkn_1n_2\cdots n_k outcomes. Hence:

  • ordered selections of rr from nn with repetition: nrn^r;
  • ordered selections without repetition (permutations): n(n−1)⋯(n−r+1)=n!(n−r)!n(n - 1)\cdots(n - r + 1) = \frac{n!}{(n - r)!}; arrangements of all nn: n!n!.

Multiply the options at each stage.

Ordered, with repetition: nrn^r. Ordered, without: n!(n−r)!\frac{n!}{(n - r)!}. All nn in order: n!n!.

Proof

Proposition 1.6Combinations

The number of unordered selections of rr objects from nn (without repetition) is (nr)=n!r! (n−r)!\binom nr = \frac{n!}{r!\,(n - r)!}. The number of ways to split nn objects into groups of sizes n1,…,nkn_1, \dots, n_k is the multinomial coefficient n!n1!⋯nk!\frac{n!}{n_1!\cdots n_k!}.

Order doesn't matter: (nr)\binom nr. Order matters: n!(n−r)!=r!(nr)\frac{n!}{(n - r)!} = r!\binom nr.

Ask yourself: is {A,B}\{A, B\} the same as {B,A}\{B, A\} here?

Proof

Technique 1.7Counting for probability

To find P(A)=∣A∣∣Ω∣\mathbb{P}(A) = \frac{|A|}{|\Omega|}: choose a sample space of equally likely outcomes (usually unordered hands, or ordered sequences), and count AA in the same way. Use the complement for "at least one". Classic results: a 5-card hand has P(exactly 2 aces)=(42)(483)(525)\mathbb{P}(\text{exactly 2 aces}) = \frac{\binom42\binom{48}3}{\binom{52}5}; the birthday problem: among nn people, P(some shared birthday)=1−365⋅364⋯(365−n+1)365n\mathbb{P}(\text{some shared birthday}) = 1 - \frac{365\cdot364\cdots(365 - n + 1)}{365^n}, which exceeds 12\frac12 for n=23n = 23.

Count numerator and denominator the same way (both ordered or both unordered).

"At least one": use the complement.

Birthday problem: 23 people give a better-than-even chance of a match.

Theorem 1.8Inclusion–exclusion for probabilities

P(A1∪⋯∪An)=∑iP(Ai)−∑i<jP(Ai∩Aj)+∑i<j<kP(Ai∩Aj∩Ak)−⋯+(−1)n+1P(A1∩⋯∩An).\mathbb{P}(A_1\cup\cdots\cup A_n) = \sum_i\mathbb{P}(A_i) - \sum_{i<j}\mathbb{P}(A_i\cap A_j) + \sum_{i<j<k}\mathbb{P}(A_i\cap A_j\cap A_k) - \cdots + (-1)^{n+1}\mathbb{P}(A_1\cap\cdots\cap A_n).

Application (derangements): if nn letters are put randomly in nn envelopes, P(no letter in the right envelope)=∑k=0n(−1)kk!→1e\mathbb{P}(\text{no letter in the right envelope}) = \sum_{k=0}^n\frac{(-1)^k}{k!}\to\frac1e.

Add singles, subtract pairs, add triples, …

Derangements: probability nobody gets their own hat ≈1e≈0.368\approx\frac1e\approx0.368.

Proof

Check 1.9Check: counting problems

  • Does order matter? Is repetition allowed? Decide before counting.
  • Count numerator and denominator in the same model.
  • Avoid double counting: if you choose "a special one, then the rest", you may count each set several times.
  • Sanity checks: the answer lies in [0,1][0, 1]; small cases by listing; complements and symmetry.

Order? Repetition? Same model top and bottom? Double counting?

Check a small case by listing.