← Back to IB Mathematics

1. Counting Principles

Permutations and Combinations

Permutations (order matters): ${}^nP_r = \dfrac{n!}{(n-r)!}$

Combinations (order doesn't matter): $\dbinom{n}{r} = {}^nC_r = \dfrac{n!}{r!(n-r)!}$

Key identity: $\dbinom{n}{r} = \dbinom{n}{n-r}$ (choosing $r$ to include = choosing $n-r$ to exclude)

Pascal's identity: $\dbinom{n}{r} = \dbinom{n-1}{r-1} + \dbinom{n-1}{r}$

Use permutations when arrangement matters (e.g., PIN codes, rankings). Use combinations when only selection matters (e.g., committee formation, card hands). Multiply counting steps that are independent (Multiplication Principle).

2. Bayes' Theorem

Bayes' theorem updates the probability of an event given new evidence. It combines prior probabilities with conditional probabilities.

Bayes' Theorem

$$P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{\displaystyle\sum_j P(B \mid A_j)\,P(A_j)}$$

The denominator is $P(B)$ computed by the law of total probability: $$P(B) = P(B|A)P(A) + P(B|A')P(A')$$

Worked Example 1

Medical Test: Bayes' Theorem

A disease affects 1% of the population. A test is 95% sensitive (correct positive if diseased) and 90% specific (correct negative if healthy). A patient tests positive. What is the probability they have the disease?

1
Define events: $D$ = has disease ($P(D)=0.01$), $T^+$ = tests positive.
2
Given: $P(T^+|D) = 0.95$, $P(T^+|D') = 1 - 0.90 = 0.10$ (false positive rate).
3
$P(T^+)$ by total probability: $0.95(0.01) + 0.10(0.99) = 0.0095 + 0.099 = 0.1085$
4
Bayes: $P(D|T^+) = \dfrac{0.95 \times 0.01}{0.1085} = \dfrac{0.0095}{0.1085} \approx 0.0876 \approx 8.8\%$
5
Interpretation: Despite a positive test, there is only about an 8.8% chance the patient has the disease. The low base rate ($1\%$) dominates.

3. Discrete Probability Distributions

Expected Value and Variance

For a discrete random variable $X$ with $P(X=x_i) = p_i$:

$E(X) = \mu = \displaystyle\sum x_i p_i$

$E(X^2) = \displaystyle\sum x_i^2 p_i$

$\operatorname{Var}(X) = \sigma^2 = E(X^2) - [E(X)]^2$

$\operatorname{SD}(X) = \sigma = \sqrt{\operatorname{Var}(X)}$

Worked Example 2

Find $E(X)$ and $\operatorname{Var}(X)$ for the distribution below

$x$1234
$P(X=x)$0.10.40.30.2
1
$E(X)$: $1(0.1)+2(0.4)+3(0.3)+4(0.2) = 0.1+0.8+0.9+0.8 = 2.6$
2
$E(X^2)$: $1(0.1)+4(0.4)+9(0.3)+16(0.2) = 0.1+1.6+2.7+3.2 = 7.6$
3
$\operatorname{Var}(X)$: $7.6 - (2.6)^2 = 7.6 - 6.76 = 0.84$

4. Poisson Distribution

Poisson Distribution: $X \sim \operatorname{Po}(\lambda)$

Models the number of independent events occurring in a fixed interval, at an average rate $\lambda$.

$$P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}, \quad k = 0, 1, 2, \ldots$$

$E(X) = \lambda$, $\operatorname{Var}(X) = \lambda$ (mean equals variance — key property!)

Worked Example 3

A factory produces on average 2 defects per hour. Find the probability of exactly 3 defects in a given hour.

1
Model: $X \sim \operatorname{Po}(2)$ (average rate $\lambda = 2$)
2
Calculate: $P(X=3) = \dfrac{2^3 e^{-2}}{3!} = \dfrac{8e^{-2}}{6} = \dfrac{4e^{-2}}{3}$
3
Numerically: $P(X=3) = \dfrac{4 \times 0.1353}{3} \approx 0.1804$
Poisson Approximation to Binomial: When $n$ is large and $p$ is small (so $np$ is moderate), $B(n,p) \approx \operatorname{Po}(np)$. As a rule of thumb, use this when $n \ge 50$ and $p \le 0.1$.

Practice Problems

Q1. In a bag: 3 red and 7 blue balls. Two balls are drawn without replacement. (a) Find $P(\text{both red})$. (b) Given at least one is red, find $P(\text{both red})$.
Show Solution

(a) $P(\text{both red}) = \dfrac{3}{10} \times \dfrac{2}{9} = \dfrac{6}{90} = \dfrac{1}{15}$

(b) $P(\text{at least one red}) = 1 - P(\text{both blue}) = 1 - \dfrac{7}{10}\cdot\dfrac{6}{9} = 1 - \dfrac{42}{90} = \dfrac{48}{90} = \dfrac{8}{15}$

$P(\text{both red} \mid \text{at least one red}) = \dfrac{1/15}{8/15} = \dfrac{1}{8}$

Q2. Emails arrive at a rate of 5 per hour ($\operatorname{Po}(5)$). Find the probability of receiving at most 2 emails in an hour.
Show Solution

$P(X \le 2) = P(0)+P(1)+P(2) = e^{-5}\left(\dfrac{5^0}{0!}+\dfrac{5^1}{1!}+\dfrac{5^2}{2!}\right) = e^{-5}(1+5+12.5) = 18.5e^{-5} \approx 0.1247$

Q3. A discrete random variable has $P(X=x) = kx$ for $x = 1, 2, 3, 4$. Find $k$, $E(X)$, and $\operatorname{Var}(X)$.
Show Solution

$\sum p = k(1+2+3+4) = 10k = 1 \Rightarrow k = 0.1$.

$E(X) = 0.1(1+4+9+16) = 3$. $E(X^2) = 0.1(1+8+27+64) = 10$. $\operatorname{Var}(X) = 10-9 = 1$.

5. Exam Tips