Math ClubMath Club
v1 · padrão canônico

Lesson 39 — Basic Discrete Probability

Sample space, events, Kolmogorov axioms. Classical probability: favorable cases over possible. Conditional probability, Bayes.

Used in: 1.º ano do EM (15–16 anos) · Equiv. Math B japonês · Equiv. Stochastik Klasse 11 alemã · Equiv. H2 Math Statistics (Singapura)

P(A)=AΩ,P(AB)=P(AB)P(B)P(A) = \frac{|A|}{|\Omega|}, \qquad P(A|B) = \frac{P(A \cap B)}{P(B)}
Choose your door

Rigorous notation, full derivation, hypotheses

Axioms and formulas

Sample space

Ω\Omega: set of all possible outcomes of the experiment. Event: subset of Ω\Omega.

Kolmogorov axioms (1933)

  1. P(A)0P(A) \geq 0 for every event AA.
  2. P(Ω)=1P(\Omega) = 1.
  3. σ\sigma-additivity: if A1,A2,A_1, A_2, \ldots disjoint: P(Ai)=P(Ai)P(\bigcup A_i) = \sum P(A_i).

Classical probability (equiprobable space)

P(A)=AΩP(A) = \frac{|A|}{|\Omega|}

Immediate properties

  • P()=0P(\emptyset) = 0.
  • P(Ac)=1P(A)P(A^c) = 1 - P(A).
  • P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B) (inclusion-exclusion).
  • ABP(A)P(B)A \subseteq B \Rightarrow P(A) \leq P(B).
  • P(A)[0,1]P(A) \in [0, 1].

Conditional probability

P(AB)=P(AB)P(B),P(B)>0P(A | B) = \frac{P(A \cap B)}{P(B)}, \quad P(B) > 0

Independence

AA and BB are independent if P(AB)=P(A)P(B)P(A \cap B) = P(A) P(B) (equivalent: P(AB)=P(A)P(A|B) = P(A)).

Bayes' theorem

P(AB)=P(BA)P(A)P(B)P(A | B) = \frac{P(B | A) P(A)}{P(B)}

Total probability

If {Ai}\{A_i\} partition of Ω\Omega: P(B)=iP(BAi)P(Ai)P(B) = \sum_i P(B | A_i) P(A_i)

Discrete random variable

X:ΩRX: \Omega \to \mathbb R. Distribution: P(X=xi)=piP(X = x_i) = p_i with pi=1\sum p_i = 1.

DistributionFormulaAppearance
BernoulliP(X=1)=pP(X=1) = p1 trial
Binomial(nk)pk(1p)nk\binom{n}{k}p^k(1-p)^{n-k}nn trials
Geometric(1p)k1p(1-p)^{k-1}pwaiting time
Poissoneλλk/k!e^{-\lambda}\lambda^k/k!rare events

Expectation and variance

  • E[X]=xipiE[X] = \sum x_i p_i
  • Var(X)=E[(XE[X])2]=E[X2]E[X]2\text{Var}(X) = E[(X - E[X])^2] = E[X^2] - E[X]^2

Exercise list

46 exercises · 11 with worked solution (25%)

Application 34Understanding 2Modeling 8Challenge 1Proof 1
  1. Ex. 39.1Application
    Toss a coin. P(heads)P(\text{heads}). (Ans: 1/21/2.)
  2. Ex. 39.2Application
    Roll a die. P(even)P(\text{even}). (Ans: 1/21/2.)
  3. Ex. 39.3Application
    Roll a die. P(X>4)P(X > 4). (Ans: 1/31/3.)
  4. Ex. 39.4Application
    Toss 2 coins. P(both heads)P(\text{both heads}). (Ans: 1/41/4.)
  5. Ex. 39.5Application
    Roll 2 dice. P(sum 7)P(\text{sum 7}). (Ans: 6/36=1/66/36 = 1/6.)
  6. Ex. 39.6Application
    Roll 2 dice. P(sum >9)P(\text{sum } > 9). (Ans: 6/36=1/66/36 = 1/6.)
  7. Ex. 39.7Application
    Draw 1 card from a deck. P(king)P(\text{king}). (Ans: 4/52=1/134/52 = 1/13.)
  8. Ex. 39.8Application
    Draw 1 card. P(hearts)P(\text{hearts}). (Ans: 1/41/4.)
  9. Ex. 39.9Application
    Draw 2 cards without replacement. P(both kings)P(\text{both kings}). (Ans: (42)/(522)=1/221\binom{4}{2}/\binom{52}{2} = 1/221.)
  10. Ex. 39.10Application
    Draw 1 card. P(king OR hearts)P(\text{king OR hearts}). (Ans: 16/52=4/1316/52 = 4/13.)
  11. Ex. 39.11Application
    P(A)=0.3P(A) = 0.3, P(B)=0.5P(B) = 0.5, P(AB)=0.1P(A \cap B) = 0.1. P(AB)P(A \cup B)? (Ans: 0.70.7.)
  12. Ex. 39.12Application
    P(Ac)P(A^c) if P(A)=0.7P(A) = 0.7. (Ans: 0.30.3.)
  13. Ex. 39.13Application
    Show P(AB)min(P(A),P(B))P(A \cap B) \leq \min(P(A), P(B)).
  14. Ex. 39.14Application
    P(A)=0.6P(A) = 0.6, P(BA)=0.4P(B|A) = 0.4. P(AB)P(A \cap B)? (Ans: 0.240.24.)
  15. Ex. 39.15ApplicationAnswer key
    P(A)=0.5P(A) = 0.5, P(B)=0.3P(B) = 0.3, A,BA, B independent. P(AB)P(A \cap B)? (Ans: 0.150.15.)
  16. Ex. 39.16Application
    Roll a die twice. P(first 6, second any)P(\text{first 6, second any}). (Ans: 1/61/6.)
  17. Ex. 39.17ApplicationAnswer key
    Mega-Sena: P(hit 6)P(\text{hit 6}). (Ans: 1/(606)2×1081/\binom{60}{6} \approx 2 \times 10^{-8}.)
  18. Ex. 39.18Application
    Quina: P(hit 5 of 6 marked)P(\text{hit 5 of 6 marked}).
  19. Ex. 39.19Application
    Binomial: XBin(10,0.5)X \sim \text{Bin}(10, 0.5). P(X=5)P(X = 5)? (Ans: (105)/2100.246\binom{10}{5}/2^{10} \approx 0.246.)
  20. Ex. 39.20ApplicationAnswer key
    XBin(5,0.3)X \sim \text{Bin}(5, 0.3). P(X=2)P(X = 2)? (Ans: (52)0.320.730.309\binom{5}{2} \cdot 0.3^2 \cdot 0.7^3 \approx 0.309.)
  21. Ex. 39.21ApplicationAnswer key
    P(A)=0.4,P(B)=0.5,P(AB)=0.2P(A) = 0.4, P(B) = 0.5, P(A \cap B) = 0.2. P(AB)P(A|B)? (Ans: 0.40.4.)
  22. Ex. 39.22ApplicationAnswer key
    In the exercise above, are AA and BB independent? (Ans: yes, P(AB)=P(A)P(A|B) = P(A).)
  23. Ex. 39.23Application
    2 dice. P(sum 7first is 4)P(\text{sum 7} | \text{first is 4}). (Ans: 1/61/6.)
  24. Ex. 39.24ApplicationAnswer key
    Box with 3 white and 7 black. Draw 2 without replacement. P(both white)P(\text{both white}). (Ans: (32)/(102)=1/15\binom{3}{2}/\binom{10}{2} = 1/15.)
  25. Ex. 39.25Application
    P(both black)P(\text{both black}) in the same problem. (Ans: (72)/(102)=21/45=7/15\binom{7}{2}/\binom{10}{2} = 21/45 = 7/15.)
  26. Ex. 39.26Application
    P(1 white, 1 black)P(\text{1 white, 1 black}). (Ans: (31)(71)/(102)=7/15\binom{3}{1}\binom{7}{1}/\binom{10}{2} = 7/15.)
  27. Ex. 39.27ApplicationAnswer key
    3 coins. P(exactly 2 heads)P(\text{exactly 2 heads}). (Ans: 3/83/8.)
  28. Ex. 39.28Application
    XBin(20,0.1)X \sim \text{Bin}(20, 0.1). P(X1)P(X \geq 1). (Ans: 10.9201 - 0.9^{20}.)
  29. Ex. 39.29Application
    Apply Bayes: P(A)=0.4,P(BA)=0.8,P(BAc)=0.3P(A) = 0.4, P(B|A) = 0.8, P(B|A^c) = 0.3. P(AB)P(A|B)? (Ans: 0.32/0.5=0.640.32/0.5 = 0.64.)
  30. Ex. 39.30ApplicationAnswer key
    Total probability: P(A1)=0.3,P(A2)=0.5,P(A3)=0.2P(A_1) = 0.3, P(A_2) = 0.5, P(A_3) = 0.2, P(BAi)=0.9,0.5,0.1P(B|A_i) = 0.9, 0.5, 0.1. P(B)P(B)? (Ans: 0.570.57.)
  31. Ex. 39.31Application
    Roll 2 dice. P(any 6)P(\text{any 6}). (Ans: 11/3611/36.)
  32. Ex. 39.32Application
    In a class, 60%60\% are girls, 40%40\% boys. It's known that 80%80\% of girls and 50%50\% of boys passed. A student passed: P(girl)P(\text{girl})?
  33. Ex. 39.33Application
    XBin(8,0.25)X \sim \text{Bin}(8, 0.25). E[X]E[X] and Var(X)\text{Var}(X). (Ans: E=2,V=1.5E = 2, V = 1.5.)
  34. Ex. 39.34Application
    Expectation of rolling 1 die. (Ans: 3.53.5.)
  35. Ex. 39.35ModelingAnswer key
    A/B testing: 10%10\% see version B. Probability of 3 friends seeing B (independent)? (Ans: 0.13=0.0010.1^3 = 0.001.)
  36. Ex. 39.36Modeling
    Rare disease: P(D)=0.01P(D) = 0.01. Test: sensitivity 95%95\%, specificity 90%90\%. P(D+)P(D|+)?
  37. Ex. 39.37ModelingAnswer key
    Quality control, defect rate 2%2\%. P(0 defects in 50 samples)P(\text{0 defects in 50 samples}). (Ans: 0.98500.3640.98^{50} \approx 0.364.)
  38. Ex. 39.38Modeling
    In a spam filter, P(spamcontains viagra)>0.9P(\text{spam}|\text{contains viagra}) > 0.9 via Bayes — model.
  39. Ex. 39.39Modeling
    In a card game, probability of two pairs (5 cards). Compute via combinatorics.
  40. Ex. 39.40Modeling
    Birthday: 23 people, P(2 share a birthday)>0.5P(\text{2 share a birthday}) > 0.5. Compute explicitly.
  41. Ex. 39.41Modeling
    In a computer network, probability of end-to-end connection in series of 5 links, each with 99%99\% reliability.
  42. Ex. 39.42ModelingAnswer key
    In an ML classifier, false positive 5%5\%, false negative 2%2\%, prevalence 1%1\%. P(true positivepositive test)P(\text{true positive}|\text{positive test}).
  43. Ex. 39.43Understanding
    Show P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B) via Kolmogorov.
  44. Ex. 39.44Understanding
    Show that if AA and BB are independent, then AcA^c and BcB^c are also independent.
  45. Ex. 39.45Challenge
    Monty Hall: 3 doors, 1 has the prize. You pick one; the host opens one of the other two without prize. Do you switch? What's the probability of winning by switching? (Ans: 2/32/3.)
  46. Ex. 39.46Proof
    Prove Bayes' theorem from the definition of conditional probability.

Sources

  • OpenIntro Statistics — Diez, Çetinkaya-Rundel, Barr · 2019, 4th ed · EN · CC-BY-SA · ch. 3: probability. Primary source.
  • Introduction to Probability — Blitzstein, Hwang · 2019, 2nd ed · EN · free (authors) · ch. 1-2: counting and Bayes.
  • Introductory Statistics — Illowsky, Dean (OpenStax) · 2022, 2nd ed · EN · CC-BY-NC-SA · ch. 3.

Updated on 2026-04-30 · Author(s): Clube da Matemática

Found an error? Open an issue on GitHub or submit a PR — open source forever.