# Discrete probability distributions

> IB Mathematics: Analysis and Approaches Higher Level · IB AA HL
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u4-discrete-probability-distributions/

This sub-topic introduces discrete random variables and their core properties. You will learn to work with probability mass functions, cumulative distributions, expected value, variance, and linear transformations, forming the foundation for all later probability work.

**Prerequisites:** [Basic probability rules](https://www.owlsprep.com/study/ib-math-aa-hl-u4-basic-probability/); [Combinatorics](https://www.owlsprep.com/study/ib-math-aa-hl-u3-combinatorics/)

## Learning objectives

- Distinguish between discrete and continuous random variables
- Construct and interpret probability mass functions and cumulative distribution functions
- Calculate expected value and variance for discrete probability distributions
- Apply rules for linear transformations of discrete random variables

## Discrete Random Variables & Probability Mass Functions

A random variable assigns a numerical value to each outcome of a random experiment. A discrete random variable can only take a countable number of distinct values (e.g., 0, 1, 2, ..., 10).

**Discrete Random Variable** — A random variable that can only take a countable set of distinct possible values.

*Example:* Number of red cards in a 5-card hand, number of defective items in a batch

**Probability Mass Function (pmf)** — A function that satisfies two core conditions for all valid $x$: $0 \leq p(x) \leq 1$, and the sum of $p(x)$ over all possible values of $x$ equals 1.

*Notation:* p(x) = P(X=x)

**Worked example:** A discrete random variable $X$ has pmf $P(X=x) = kx$ for $x \in \{1, 2, 3, 4\}$, and 0 otherwise. Find the value of $k$.

1. Use the core property that the sum of all probabilities equals 1:

   $$\sum_{x=1}^4 P(X=x) = 1$$
2. Substitute the pmf into the sum:

   $$k(1) + k(2) + k(3) + k(4) = 1 \implies 10k = 1$$
3. Solve for $k$:

   $$k = \frac{1}{10}$$

> **Exam tip:** Always check that the sum of your pmf equals 1. This is a quick check to catch calculation errors in exams.

## Cumulative Distribution Functions

The cumulative distribution function (cdf) gives the probability that the random variable $X$ is less than or equal to a given value $x$. It is useful for calculating probabilities of ranges of outcomes.

**Cumulative Distribution Function (cdf)** — For discrete $X$, $F(x)$ is the sum of the pmf for all values of $X$ that are less than or equal to $x$. It is always non-decreasing and ranges from 0 to 1.

*Notation:* F(x) = P(X \leq x)

**Worked example:** Using the pmf $P(X=x) = \frac{x}{10}$ for $x = 1, 2, 3, 4$, find the cumulative distribution function $F(x)$.

1. For $x < 1$, no values of $X$ are less than or equal to $x$, so $F(x) = 0$.
2. For $1 \leq x < 2$, only $x=1$ is included:

   $$F(x) = P(X=1) = \frac{1}{10}$$
3. For $2 \leq x < 3$, add the probability of $x=2$:

   $$F(x) = \frac{1}{10} + \frac{2}{10} = \frac{3}{10}$$
4. For $3 \leq x < 4$, add the probability of $x=3$:

   $$F(x) = \frac{3}{10} + \frac{3}{10} = \frac{3}{5}$$
5. For $x \geq 4$, add all probabilities:

   $$F(x) = \frac{6}{10} + \frac{4}{10} = 1$$

> **Exam tip:** To find $P(a < X \leq b)$ for discrete $X$, use the shortcut $F(b) - F(a)$. This saves time compared to summing all individual probabilities.

## Expected Value and Variance

Expected value (or population mean) measures the center of the distribution, while variance measures the spread around the center. Both are core summary statistics for any discrete distribution.

**Expected Value** — The expected value is the long-run average of $X$ over many repeated trials, calculated as: $E[X] = \sum_x x \cdot p(x)$.

*Notation:* E[X] \text{ or } \mu

**Variance** — Variance measures spread, calculated most efficiently with the shortcut formula:

*Notation:* \text{Var}(X) \text{ or } \sigma^2

$$\text{Var}(X) = E[X^2] - (E[X])^2, \quad \text{where } E[X^2] = \sum_x x^2 p(x)$$

**Worked example:** For the distribution $P(X=x) = \frac{x}{10}$, $x \in \{1, 2, 3, 4\}$, calculate $E[X]$ and $\text{Var}(X)$.

1. Calculate expected value by summing $x \cdot p(x)$:

   $$E[X] = (1 \cdot \frac{1}{10}) + (2 \cdot \frac{2}{10}) + (3 \cdot \frac{3}{10}) + (4 \cdot \frac{4}{10}) = \frac{30}{10} = 3$$
2. Calculate $E[X^2]$ for the variance formula:

   $$E[X^2] = (1^2 \cdot \frac{1}{10}) + (2^2 \cdot \frac{2}{10}) + (3^2 \cdot \frac{3}{10}) + (4^2 \cdot \frac{4}{10}) = \frac{100}{10} = 10$$
3. Apply the shortcut variance formula:

   $$\text{Var}(X) = 10 - (3)^2 = 1$$

> **Exam tip:** Always use the $E[X^2] - (E[X])^2$ shortcut. It avoids expanding squared deviations and reduces calculation errors.

## Linear Transformations of Discrete Random Variables

Exams commonly ask for the expected value and variance of a linear transformation of a random variable, of the form $Y = aX + b$ where $a$ and $b$ are constants. There are simple rules for these calculations.

**Linear Transformation Rules** — For any constants $a$ and $b$, the following rules hold:

$$E[aX + b] = aE[X] + b \\ \text{Var}(aX + b) = a^2 \text{Var}(X)$$

The constant $b$ shifts the distribution but does not change its spread, so it does not affect variance.

> **warning**
>
> You must square the coefficient $a$ when calculating variance. This is one of the most frequently tested and frequently missed rules in IB exams.

**Worked example:** Given $E[X] = 3$ and $\text{Var}(X) = 1$, find $E[2X - 5]$ and $\text{Var}(2X - 5)$.

1. Apply the expected value rule:

   $$E[2X - 5] = 2E[X] - 5 = 2(3) - 5 = 1$$
2. Apply the variance rule, squaring the coefficient 2:

   $$\text{Var}(2X - 5) = (2)^2 \text{Var}(X) = 4(1) = 4$$

## Common pitfalls

- **Wrong:** Forgetting to find the scaling constant $k$ to normalize the pmf
  - Why it fails: You assume the given function is already a valid pmf without checking the sum of probabilities
  - Correct: Always calculate $k$ by setting the sum of all probabilities equal to 1 before any further calculations
- **Wrong:** Calculating $\text{Var}(aX + b) = a\text{Var}(X)$ instead of $a^2\text{Var}(X)$
  - Why it fails: Confusing the expected value rule with the variance rule
  - Correct: Remember scaling $X$ by $a$ scales the spread by $a^2$, so always square the coefficient for variance
- **Wrong:** Calculating $P(X < x) = F(x)$ for discrete $X$
  - Why it fails: Forgetting that $F(x)$ includes $P(X=x)$, so it overcounts for strict inequality
  - Correct: For discrete $X$, $P(X < x) = F(x) - P(X=x)$
- **Wrong:** Treating a discrete random variable as continuous and integrating over an interval
  - Why it fails: Confusing discrete and continuous random variable probability rules
  - Correct: Always sum the probabilities of individual discrete outcomes when working with discrete distributions
- **Wrong:** Ignoring a negative variance result and proceeding
  - Why it fails: You don't remember that variance can't be negative
  - Correct: A negative variance always indicates an arithmetic error. Go back and recalculate $E[X^2]$ and $(E[X])^2$

## Cheatsheet

| Concept | Key Formula/Rule |
| --- | --- |
| Discrete Random Variable | Countable distinct values |
| pmf $p(x) = P(X=x)$ | $0 \leq p(x) \leq 1$, $\sum p(x) = 1$ |
| cdf $F(x)$ | $P(X \leq x) = \sum_{y \leq x} p(y)$ |
| Expected Value $E[X]$ | $\sum x \cdot p(x)$ |
| Variance $\text{Var}(X)$ | $E[X^2] - (E[X])^2$, $E[X^2] = \sum x^2 p(x)$ |
| Linear transform expectation | $E[aX + b] = aE[X] + b$ |
| Linear transform variance | $\text{Var}(aX + b) = a^2 \text{Var}(X)$ |

## What's next

Discrete probability distributions form the foundation for all named discrete distributions you will study next, and are used extensively in statistical inference later in the course. Mastery of pmf, cdf, expected value, and variance here will make working with the binomial and other common discrete distributions much simpler. The rules for linear transformations also prepare you for working with combinations of multiple random variables, a common topic in higher-level IB exam questions.

- [Binomial distribution](https://www.owlsprep.com/study/ib-math-aa-hl-u4-binomial-distribution/)
- [Continuous probability distributions and PDFs](https://www.owlsprep.com/study/ib-math-aa-hl-u4-continuous-probability-distributions-and-pdfs/)
- [Normal distribution](https://www.owlsprep.com/study/ib-math-aa-hl-u4-normal-distribution/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u4-discrete-probability-distributions/
