mindstair

Home / Courses / Probability / Unit 4

Probability Unit 4: Discrete Random Variables

A random variable assigns a number to each outcome of an experiment. This unit covers how discrete random variables are described by PMFs and CDFs and summarized by expected value and variance.

Covers: Random variables and PMFs, Cumulative distribution functions, Expected value, Expectation of a function (LOTUS), Variance and standard deviation, Linear transformations, Indicator variables, Deductibles and policy limits

Study guide

A random variable X is a function that assigns a number to each outcome in the sample space. It is discrete when its possible values can be listed, such as the number of heads in ten flips. Its probability mass function p(x) = P(X = x) must be nonnegative and sum to 1 over all possible values. The cumulative distribution function F(x) = P(X ≤ x) is a nondecreasing step function that jumps by p(x) at each possible value and rises from 0 to 1. You can move between the two: p(x) is the size of the jump in F at x, and P(a < X ≤ b) = F(b) − F(a).

The expected value E[X] = Σ x p(x) is the long-run average of X over many repetitions, the balance point of the PMF. It need not be a possible value: a fair die has mean 3.5. To find the expectation of a function, use the law of the unconscious statistician, E[g(X)] = Σ g(x)p(x). In general E[g(X)] ≠ g(E[X]); for example E[1/X] differs from 1/E[X]. Expectation is linear, so E[aX + b] = aE[X] + b, and the expectation of a sum is the sum of expectations even when the variables are dependent.

Variance measures spread: Var(X) = E[(X − μ)²] = E[X²] − μ², and the standard deviation is its square root, in the same units as X. Shifting X does not change its variance, while scaling multiplies it: Var(aX + b) = a²Var(X). The mean is the constant c that minimizes E[(X − c)²], and that minimum is exactly the variance. A useful identity for nonnegative integer variables is the tail-sum formula E[X] = Σ_{k≥1} P(X ≥ k), which is often the quickest route to a mean.

Indicator variables make hard expectations easy. Write a count as a sum of indicators, Iⱼ = 1 if event j happens, so that E[count] = Σ P(event j). This gives the expected number of people who get their own hat (always 1) and the expected number of distinct faces in six die rolls. Insurance problems are another common application: the payment is a function of the loss, such as max(X − d, 0) with a deductible d or min(·, u) with a limit u. Compute the payment for each possible loss first, then take the expectation.

Key ideas

Formulas and rules

E[X] = Σ x p(x); E[g(X)] = Σ g(x) p(x)
Var(X) = E[X²] − (E[X])²; SD(X) = √Var(X)
E[aX + b] = aE[X] + b; Var(aX + b) = a²Var(X)
P(a < X ≤ b) = F(b) − F(a); p(x) = jump of F at x
Tail sum: E[X] = Σ_{k≥1} P(X ≥ k) for X ∈ {0, 1, 2, …}
Deductible d: payment = max(X − d, 0); with limit u: min(max(X − d, 0), u)

Common mistakes

Before the test, make sure you can

Words to know

Random variable
A function assigning a real number to each outcome of an experiment.
Discrete random variable
A random variable whose possible values can be listed.
PMF
p(x) = P(X = x), nonnegative and summing to 1.
CDF
F(x) = P(X ≤ x), nondecreasing from 0 to 1.
Expected value
E[X] = Σ x p(x), the long-run average of X.
LOTUS
E[g(X)] = Σ g(x)p(x), the law of the unconscious statistician.
Variance
Var(X) = E[(X − μ)²] = E[X²] − μ².
Standard deviation
The square root of the variance, in the units of X.
Linearity of expectation
E[aX + bY + c] = aE[X] + bE[Y] + c, with or without independence.
Indicator variable
A variable equal to 1 if an event occurs and 0 otherwise; its mean is the event's probability.
Mode
The value with the highest probability.
Median
A value m with P(X ≤ m) ≥ ½ and P(X ≥ m) ≥ ½.
Deductible
An amount subtracted from each loss before the insurer pays.
Policy limit
The maximum amount an insurer will pay on a loss.
Tail-sum formula
For nonnegative integer X, E[X] = Σ_{k≥1} P(X ≥ k).
Hypergeometric distribution
Counts successes in a sample drawn without replacement from a finite population.

Sample practice questions

30 more questions like these, from level 1 to 5, are in the practice set.

Question 1 (level 1)

Which two conditions must a function p(x) satisfy to be a probability mass function?

  1. p is increasing and its largest value is 1
  2. p(x) ≥ 0 for all x and Σ p(x) = 1
  3. p(x) > 0 for all real x and ∫ p(x) dx = 1
  4. p(x) ≤ 1 for all x and Σ p(x) = 0
Show the answer and steps

Answer: B) p(x) ≥ 0 for all x and Σ p(x) = 1

  1. A PMF gives probabilities, so each value is nonnegative.
  2. The possible values are exhaustive, so the probabilities add to 1.
  3. Integrals and positivity at every real x describe densities, not PMFs.
Question 2 (level 1)

For a discrete random variable X with PMF p(x), the expected value E[X] is:

  1. Σ x p(x)
  2. Σ x²p(x)
  3. Σ p(x)/x
  4. The most likely value of X
Show the answer and steps

Answer: A) Σ x p(x)

  1. E[X] is the probability-weighted average of the possible values.
  2. Multiply each value by its probability and add.
  3. The most likely value is the mode, and Σ x²p(x) is E[X²].
Question 3 (level 3)

Find the variance of a single roll of a fair six-sided die.

  1. 35/12
  2. 49/4
  3. 7/2
  4. 91/6
Show the answer and steps

Answer: A) 35/12

  1. E[X²] = (1 + 4 + 9 + 16 + 25 + 36)/6 = 91/6.
  2. (E[X])² = (7/2)² = 49/4.
  3. Var = 91/6 − 49/4 = 182/12 − 147/12 = 35/12 ≈ 2.92.