IB Mathematics AI – Topic 4

Statistics & Probability: Probability Distributions

Random Variables & Discrete Probability Distributions

Random Variables

Definition: A random variable is a numerical variable whose value depends on the outcome of a random phenomenon. It assigns a numerical value to each outcome in a sample space.

Types of Random Variables:

  • Discrete Random Variable: Takes countable values (e.g., 0, 1, 2, 3, ...)
  • Continuous Random Variable: Takes any value in an interval (e.g., height, time, temperature)

Notation:

Random variables are typically denoted by capital letters: X, Y, Z

Specific values are denoted by lowercase: x, y, z

Example: \(P(X = 3)\) means "probability that X equals 3"

Discrete Probability Distributions

Definition: A discrete probability distribution lists all possible values of a discrete random variable along with their associated probabilities.

Properties:

  • Each probability must satisfy: \(0 \leq P(X = x_i) \leq 1\)
  • Sum of all probabilities equals 1: \(\sum P(X = x_i) = 1\)

Expected Value (Mean):

\[ E(X) = \mu = \sum x_i \cdot P(X = x_i) \]

The long-term average value if the experiment is repeated many times

Variance:

\[ \text{Var}(X) = \sigma^2 = E(X^2) - [E(X)]^2 = \sum x_i^2 \cdot P(X = x_i) - \mu^2 \]

Standard Deviation:

\[ \sigma = \sqrt{\text{Var}(X)} \]

⚠️ Common Pitfalls & Tips:

  • Always verify that probabilities sum to 1 before proceeding
  • Expected value is NOT always a possible outcome (e.g., expected 2.5 children)
  • For variance, calculate \(E(X^2)\) first, then subtract \([E(X)]^2\) – don't confuse order
  • Standard deviation has same units as X; variance has squared units

📝 Worked Example 1: Discrete Probability Distribution

Question: A discrete random variable X has the following probability distribution:

x0123
P(X = x)0.10.3k0.2

(a) Find the value of k.

(b) Calculate \(E(X)\), the expected value of X.

(c) Calculate \(\text{Var}(X)\) and the standard deviation of X.

Solution:

(a) Finding k:

Since probabilities must sum to 1:

\[ 0.1 + 0.3 + k + 0.2 = 1 \]

\[ 0.6 + k = 1 \]

\[ k = 0.4 \]

(b) Expected Value:

\[ E(X) = \sum x_i \cdot P(X = x_i) \]

\[ E(X) = 0(0.1) + 1(0.3) + 2(0.4) + 3(0.2) \]

\[ E(X) = 0 + 0.3 + 0.8 + 0.6 = 1.7 \]

\(E(X) = 1.7\)

(c) Variance and Standard Deviation:

First, calculate \(E(X^2)\):

\[ E(X^2) = \sum x_i^2 \cdot P(X = x_i) \]

\[ E(X^2) = 0^2(0.1) + 1^2(0.3) + 2^2(0.4) + 3^2(0.2) \]

\[ E(X^2) = 0 + 0.3 + 1.6 + 1.8 = 3.7 \]

Now calculate variance:

\[ \text{Var}(X) = E(X^2) - [E(X)]^2 = 3.7 - (1.7)^2 = 3.7 - 2.89 = 0.81 \]

Standard deviation:

\[ \sigma = \sqrt{0.81} = 0.9 \]

\(\text{Var}(X) = 0.81\), \(\sigma = 0.9\)

Binomial Distribution

Definition & Conditions

Definition: The binomial distribution models the number of successes in a fixed number of independent trials, where each trial has the same probability of success.

Conditions for Binomial Distribution (BINS):

  1. Binary outcomes: Only two possible outcomes (success or failure)
  2. Independent trials: Outcome of one trial doesn't affect others
  3. Number of trials fixed: n is predetermined
  4. Same probability: p remains constant for all trials

Notation:

If X follows a binomial distribution:

\[ X \sim B(n, p) \]

where n = number of trials, p = probability of success

Probability Formula:

\[ P(X = r) = \binom{n}{r} p^r (1-p)^{n-r} = \frac{n!}{r!(n-r)!} p^r q^{n-r} \]

where \(r\) is the number of successes, \(q = 1-p\)

Mean and Variance:

\[ E(X) = np \]

\[ \text{Var}(X) = np(1-p) = npq \]

\[ \text{Standard Deviation} = \sqrt{npq} \]

⚠️ Common Pitfalls & Tips:

  • Always use GDC for binomial probabilities – manual calculation is error-prone
  • Check BINS conditions before applying binomial distribution
  • "At least" and "at most" questions require cumulative probabilities
  • \(P(X \geq r) = 1 - P(X \leq r-1)\) (useful for complement)
  • "More than r" means \(X \geq r+1\), NOT \(X \geq r\)
  • Know your GDC functions: binompdf for \(P(X=r)\), binomcdf for \(P(X \leq r)\)

📝 Worked Example 2: Binomial Distribution

Question: A basketball player has a 70% success rate for free throws. She attempts 12 free throws.

(a) Explain why this situation can be modeled by a binomial distribution.

(b) Find the probability she makes exactly 9 successful shots.

(c) Find the probability she makes at least 10 successful shots.

(d) Calculate the expected number of successful shots and the standard deviation.

Solution:

(a) Why binomial?

This satisfies all BINS conditions:

  • Binary: Each shot is either successful or not (two outcomes)
  • Independent: Each free throw is independent of the others
  • Number fixed: n = 12 trials is predetermined
  • Same probability: p = 0.7 remains constant for all attempts

Therefore, let X = number of successful shots, then \(X \sim B(12, 0.7)\)

(b) P(X = 9):

Using GDC: binompdf(12, 0.7, 9)

Or using formula:

\[ P(X = 9) = \binom{12}{9} (0.7)^9 (0.3)^3 \]

\[ P(X = 9) = \frac{12!}{9! \cdot 3!} (0.7)^9 (0.3)^3 = 220 \times 0.04035 \times 0.027 \]

\[ P(X = 9) = 0.240 \text{ (3 s.f.)} \]

(c) P(X ≥ 10):

"At least 10" means 10, 11, or 12 successes

Method 1 – Direct addition:

\[ P(X \geq 10) = P(X=10) + P(X=11) + P(X=12) \]

Using GDC: binompdf(12, 0.7, 10) + binompdf(12, 0.7, 11) + binompdf(12, 0.7, 12)

Method 2 – Using complement (easier):

\[ P(X \geq 10) = 1 - P(X \leq 9) \]

Using GDC: 1 - binomcdf(12, 0.7, 9)

\[ P(X \geq 10) = 1 - 0.7237 = 0.276 \text{ (3 s.f.)} \]

(d) Expected value and standard deviation:

Expected number of successes:

\[ E(X) = np = 12 \times 0.7 = 8.4 \text{ shots} \]

Variance:

\[ \text{Var}(X) = np(1-p) = 12 \times 0.7 \times 0.3 = 2.52 \]

Standard deviation:

\[ \sigma = \sqrt{2.52} = 1.59 \text{ shots (3 s.f.)} \]

Normal Distribution

Definition & Properties

Definition: The normal distribution is a continuous probability distribution characterized by a symmetric, bell-shaped curve. It's one of the most important distributions in statistics.

Notation:

\[ X \sim N(\mu, \sigma^2) \]

where \(\mu\) = mean, \(\sigma^2\) = variance, \(\sigma\) = standard deviation

Key Properties:

  • Symmetric about the mean \(\mu\)
  • Bell-shaped curve (Gaussian curve)
  • Mean = Median = Mode (all at center)
  • Total area under curve = 1
  • Curve never touches x-axis (extends to ±∞)
  • 68% of data within 1 standard deviation of mean
  • 95% of data within 2 standard deviations of mean
  • 99.7% of data within 3 standard deviations of mean

Standard Normal Distribution:

Special case with \(\mu = 0\) and \(\sigma = 1\):

\[ Z \sim N(0, 1) \]

Standardization (Z-score):

\[ Z = \frac{X - \mu}{\sigma} \]

Converts any normal distribution to standard normal

Calculating Probabilities:

For \(X \sim N(\mu, \sigma^2)\):

  • \(P(X < a)\): Use normalcdf(-∞, a, μ, σ) on GDC
  • \(P(X > a)\): Use normalcdf(a, ∞, μ, σ) or \(1 - P(X < a)\)
  • \(P(a < X < b)\): Use normalcdf(a, b, μ, σ)

Inverse Normal (Finding Values):

To find x given \(P(X < x) = p\): Use invNorm(p, μ, σ)

⚠️ Common Pitfalls & Tips:

  • Always use GDC – no need to use z-tables in IB exams
  • Remember: variance is \(\sigma^2\), not \(\sigma\) in the notation
  • For "at least," use \(P(X \geq a) = 1 - P(X < a)\)
  • Sketch a diagram to visualize the area you're finding
  • Check if your answer makes sense (probabilities between 0 and 1)
  • For inverse normal, input the probability, not the z-score

📝 Worked Example 3: Normal Distribution

Question: The heights of adult males in a city are normally distributed with mean 175 cm and standard deviation 8 cm.

(a) Find the probability that a randomly selected male is taller than 185 cm.

(b) Find the probability that a randomly selected male has height between 170 cm and 180 cm.

(c) Find the height that is exceeded by only 10% of males.

Solution:

Given: Let X = height of adult males, \(X \sim N(175, 8^2)\)

\(\mu = 175\) cm, \(\sigma = 8\) cm

(a) P(X > 185):

We need the probability of height greater than 185 cm.

Using GDC: normalcdf(185, 1×10⁹⁹, 175, 8)

Or: \(1 - \text{normalcdf}(-1 \times 10^{99}, 185, 175, 8)\)

Alternative using z-score (for understanding):

\[ Z = \frac{185 - 175}{8} = \frac{10}{8} = 1.25 \]

Then \(P(X > 185) = P(Z > 1.25)\)

\[ P(X > 185) = 0.106 \text{ or } 10.6\% \]

(b) P(170 < X < 180):

Using GDC: normalcdf(170, 180, 175, 8)

\[ P(170 < X < 180) = 0.468 \text{ or } 46.8\% \]

Interpretation: About 46.8% of adult males have heights between 170 cm and 180 cm.

(c) Height exceeded by 10%:

We need to find h such that \(P(X > h) = 0.10\)

This is equivalent to \(P(X < h) = 0.90\)

Using GDC: invNorm(0.90, 175, 8)

\[ h = 185.3 \text{ cm (1 d.p.)} \]

Interpretation: 10% of males are taller than 185.3 cm (or 90% are shorter than 185.3 cm).

📝 Worked Example 4: Normal Approximation to Binomial

Question: A fair coin is tossed 100 times. Use a normal approximation to find the probability of getting between 45 and 55 heads (inclusive).

Solution:

Step 1: Set up binomial

Let X = number of heads, \(X \sim B(100, 0.5)\)

We could use binomial, but with large n, normal approximation is easier.

Step 2: Check if normal approximation is valid

Normal approximation works well when \(np > 5\) and \(n(1-p) > 5\)

\(np = 100(0.5) = 50 > 5\) ✓

\(n(1-p) = 100(0.5) = 50 > 5\) ✓

Step 3: Find parameters for normal distribution

Mean: \(\mu = np = 100(0.5) = 50\)

Variance: \(\sigma^2 = np(1-p) = 100(0.5)(0.5) = 25\)

Standard deviation: \(\sigma = \sqrt{25} = 5\)

So approximate with \(X \sim N(50, 25)\)

Step 4: Apply continuity correction

Since binomial is discrete and normal is continuous, apply continuity correction:

\(P(45 \leq X \leq 55)\) becomes \(P(44.5 < X < 55.5)\)

Step 5: Calculate probability

Using GDC: normalcdf(44.5, 55.5, 50, 5)

\[ P(45 \leq X \leq 55) \approx 0.730 \text{ or } 73.0\% \]

Interpretation: There's approximately a 73% chance of getting between 45 and 55 heads in 100 coin tosses.

Poisson Distribution (HL Only)

Definition & Applications

Definition: The Poisson distribution models the number of events occurring in a fixed interval of time or space when events occur independently and at a constant average rate.

Notation:

\[ X \sim \text{Po}(\lambda) \]

where \(\lambda\) (lambda) = mean number of occurrences per interval

Probability Formula:

\[ P(X = r) = \frac{e^{-\lambda} \lambda^r}{r!} \quad \text{for } r = 0, 1, 2, 3, \ldots \]

Mean and Variance:

\[ E(X) = \lambda \]

\[ \text{Var}(X) = \lambda \]

Unique property: mean equals variance

Common Applications:

  • Number of phone calls received per hour
  • Number of emails received per day
  • Number of arrivals at a service point
  • Number of defects per unit of product
  • Number of accidents per week

⚠️ Common Pitfalls & Tips:

  • λ must match the time interval in the question – adjust if necessary
  • If λ = 3 per hour, then for 30 minutes use λ = 1.5
  • Use poissonpdf for \(P(X=r)\) and poissoncdf for \(P(X \leq r)\)
  • Always use GDC – manual calculations with factorials are tedious
  • Poisson approximates binomial when n is large and p is small

📝 Worked Example 5: Poisson Distribution

Question: A call center receives an average of 4.5 calls per minute.

(a) Find the probability that exactly 6 calls are received in a given minute.

(b) Find the probability that fewer than 3 calls are received in a given minute.

(c) Find the probability that at least 2 calls are received in a 30-second interval.

Solution:

Given: Average rate = 4.5 calls per minute

Let X = number of calls per minute, \(X \sim \text{Po}(4.5)\)

(a) P(X = 6):

Using GDC: poissonpdf(4.5, 6)

Or using formula:

\[ P(X = 6) = \frac{e^{-4.5} \times 4.5^6}{6!} = \frac{e^{-4.5} \times 8303.77}{720} \]

\[ P(X = 6) = 0.128 \text{ or } 12.8\% \]

(b) P(X < 3):

"Fewer than 3" means 0, 1, or 2 calls

\(P(X < 3) = P(X \leq 2)\)

Using GDC: poissoncdf(4.5, 2)

\[ P(X < 3) = P(X=0) + P(X=1) + P(X=2) = 0.174 \text{ or } 17.4\% \]

(c) At least 2 calls in 30 seconds:

Important: Adjust λ for the time interval!

30 seconds = 0.5 minutes

New rate: \(\lambda = 4.5 \times 0.5 = 2.25\) calls per 30 seconds

Let Y = number of calls in 30 seconds, \(Y \sim \text{Po}(2.25)\)

We need \(P(Y \geq 2) = 1 - P(Y \leq 1)\)

Using GDC: 1 - poissoncdf(2.25, 1)

\[ P(Y \geq 2) = 1 - 0.431 = 0.569 \text{ or } 56.9\% \]

Combinations of Random Variables

Linear Combinations

Definition: When random variables are combined through addition, subtraction, or multiplication by constants, the resulting combination has predictable properties.

Rules for Expected Values:

For random variables X and Y, and constants a, b:

1. Constant multiple:

\[ E(aX) = a \cdot E(X) \]

2. Sum/Difference (always, independent or not):

\[ E(X \pm Y) = E(X) \pm E(Y) \]

3. Linear combination:

\[ E(aX + bY) = a \cdot E(X) + b \cdot E(Y) \]

4. Constant addition:

\[ E(X + c) = E(X) + c \]

Rules for Variances:

1. Constant multiple:

\[ \text{Var}(aX) = a^2 \cdot \text{Var}(X) \]

2. Constant addition (variance unchanged):

\[ \text{Var}(X + c) = \text{Var}(X) \]

3. Sum/Difference (only if X and Y are independent):

\[ \text{Var}(X \pm Y) = \text{Var}(X) + \text{Var}(Y) \]

Note: Variance adds even when subtracting random variables!

4. Linear combination (if independent):

\[ \text{Var}(aX + bY) = a^2 \cdot \text{Var}(X) + b^2 \cdot \text{Var}(Y) \]

Sum of Independent Normal Variables:

If \(X \sim N(\mu_1, \sigma_1^2)\) and \(Y \sim N(\mu_2, \sigma_2^2)\) are independent:

\[ X + Y \sim N(\mu_1 + \mu_2, \sigma_1^2 + \sigma_2^2) \]

\[ X - Y \sim N(\mu_1 - \mu_2, \sigma_1^2 + \sigma_2^2) \]

⚠️ Common Pitfalls & Tips:

  • Critical: Variances ADD even when subtracting variables
  • Adding constants doesn't change variance
  • Multiplying by constant squares the variance: \(\text{Var}(2X) = 4\text{Var}(X)\)
  • For variances to add, variables must be independent
  • Expected values always add/subtract regardless of independence

📝 Worked Example 6: Combinations of Random Variables

Question: The masses of apples from Farm A are normally distributed with mean 150g and standard deviation 20g. The masses of apples from Farm B are normally distributed with mean 180g and standard deviation 25g. Assume masses are independent.

(a) Find the mean and standard deviation of the total mass of one apple from each farm.

(b) Find the probability that the total mass exceeds 350g.

(c) Find the mean and standard deviation of the difference in mass (Farm B - Farm A).

Solution:

Given:

Let A = mass from Farm A: \(A \sim N(150, 20^2)\)

Let B = mass from Farm B: \(B \sim N(180, 25^2)\)

(a) Total mass T = A + B:

Mean:

\[ E(T) = E(A + B) = E(A) + E(B) = 150 + 180 = 330 \text{g} \]

Variance:

\[ \text{Var}(T) = \text{Var}(A) + \text{Var}(B) = 20^2 + 25^2 = 400 + 625 = 1025 \]

Standard deviation:

\[ \sigma_T = \sqrt{1025} = 32.0 \text{g (3 s.f.)} \]

Therefore: \(T \sim N(330, 1025)\)

(b) P(T > 350):

Using GDC: normalcdf(350, 1×10⁹⁹, 330, 32.0)

\[ P(T > 350) = 0.266 \text{ or } 26.6\% \]

(c) Difference D = B - A:

Mean:

\[ E(D) = E(B - A) = E(B) - E(A) = 180 - 150 = 30 \text{g} \]

Variance (note: still ADD):

\[ \text{Var}(D) = \text{Var}(B) + \text{Var}(A) = 625 + 400 = 1025 \]

Standard deviation:

\[ \sigma_D = \sqrt{1025} = 32.0 \text{g} \]

Therefore: \(D \sim N(30, 1025)\)

Note: Same standard deviation as the sum, but different mean!

📊 Quick Reference Summary

Discrete Distributions

  • Expected Value: \(\sum x_i P(x_i)\)
  • Variance: \(E(X^2) - [E(X)]^2\)

Binomial: \(X \sim B(n,p)\)

  • Mean: \(np\)
  • Variance: \(np(1-p)\)
  • Use GDC for probabilities

Normal: \(X \sim N(\mu, \sigma^2)\)

  • 68-95-99.7 rule
  • Symmetric, bell-shaped
  • Use normalcdf/invNorm

Poisson: \(X \sim Po(\lambda)\)

  • Mean = Variance = \(\lambda\)
  • Adjust \(\lambda\) for time interval
  • Use poissonpdf/cdf

Combinations (Independent)

  • \(E(X \pm Y) = E(X) \pm E(Y)\)
  • \(\text{Var}(X \pm Y) = \text{Var}(X) + \text{Var}(Y)\)
  • \(\text{Var}(aX) = a^2 \text{Var}(X)\)

🖩 Essential GDC Functions

DistributionFunctionUse
Binomialbinompdf(n, p, r)\(P(X = r)\)
Binomialbinomcdf(n, p, r)\(P(X \leq r)\)
Normalnormalcdf(a, b, μ, σ)\(P(a < X < b)\)
NormalinvNorm(p, μ, σ)Find x given \(P(X < x) = p\)
Poissonpoissonpdf(λ, r)\(P(X = r)\)
Poissonpoissoncdf(λ, r)\(P(X \leq r)\)

✍️ IB Exam Strategy for Distributions

  1. Identify the distribution: Read carefully to determine which distribution applies
  2. Check conditions: For binomial, verify BINS conditions
  3. Define variables: Always state "Let X = ..." with units
  4. Write distribution: Use proper notation like \(X \sim N(50, 9)\)
  5. State GDC use: Write "Using GDC:" before showing results
  6. Interpret results: Write conclusions in context of the question
  7. For combinations: Clearly show mean and variance calculations
  8. Sketch diagrams: For normal distribution, sketch and shade the area
  9. Check reasonableness: Do your answers make sense?
  10. Use complement: For "at least" problems, often easier to use \(1 - P(X < r)\)

🎯 Which Distribution to Use?

Use BINOMIAL when:

  • Fixed number of independent trials
  • Each trial has two outcomes (success/failure)
  • Probability of success is constant
  • Example: Number of heads in 10 coin flips

Use NORMAL when:

  • Data is continuous (measurements)
  • Distribution is approximately symmetric
  • Mean and standard deviation are given
  • Example: Heights, weights, test scores

Use POISSON when:

  • Counting events in a fixed interval
  • Events occur independently
  • Average rate is known
  • Example: Number of calls per hour, arrivals per day