Skip to content
๐ŸŽฏโญ INTERACTIVE LESSON

Discrete Random Variables

Learn step-by-step with interactive practice!

Discrete Random Variables - Complete Interactive Lesson

Part 1: Discrete Random Variables

๐ŸŽฒ Discrete Random Variables

Part 1 of 7 โ€” Probability Distributions


What Is a Random Variable?

A random variable assigns a numerical value to each outcome of a random process.

TypeValuesExamples
DiscreteCountable (finite or countably infinite)Number of heads in 10 flips, dice roll
ContinuousAny value in an intervalHeight, weight, time

๐Ÿ”‘ Key Idea: A discrete random variable has a probability distribution that lists every possible value and its probability.


Probability Distribution Table

XX0123
P(X)P(X)0.10.30.40.2

Requirements:

  • Every probability is between 0 and 1: 0โ‰คP(X=x)โ‰ค10 \leq P(X = x) \leq 1
  • All probabilities sum to 1: โˆ‘P(X=x)=1\sum P(X = x) = 1

Reading the Table

From the table above:

  • P(X=2)=0.4P(X = 2) = 0.4
  • P(Xโ‰ฅ2)=P(X=2)+P(X=3)=0.4+0.2=0.6P(X \geq 2) = P(X=2) + P(X=3) = 0.4 + 0.2 = 0.6
  • P(X<2)=P(X=0)+P(X=1)=0.1+0.3=0.4P(X < 2) = P(X=0) + P(X=1) = 0.1 + 0.3 = 0.4

Concept Check ๐ŸŽฏ

Probability Distribution Practice ๐Ÿงฎ

Given: P(X=1)=0.25P(X=1) = 0.25, P(X=2)=0.35P(X=2) = 0.35, P(X=3)=0.30P(X=3) = 0.30, P(X=4)=0.10P(X=4) = 0.10

1) P(Xโ‰ค2)P(X \leq 2)?

2) P(X>2)P(X > 2)?

3) Do the probabilities sum to 1? (yes or no)

Part 2: Expected Value

๐ŸŽฏ Expected Value (Mean of a Random Variable)

Part 2 of 7 โ€” Expected Value


The Mean of a Discrete Random Variable

ฮผX=E(X)=โˆ‘xiโ‹…P(xi)\mu_X = E(X) = \sum x_i \cdot P(x_i)

The expected value is the long-run average โ€” if you repeated the random process many times, the average outcome would approach E(X)E(X).


Worked Example

XX0123
P(X)P(X)0.10.30.40.2

E(X)=0(0.1)+1(0.3)+2(0.4)+3(0.2)=0+0.3+0.8+0.6=1.7E(X) = 0(0.1) + 1(0.3) + 2(0.4) + 3(0.2) = 0 + 0.3 + 0.8 + 0.6 = 1.7

โš ๏ธ The expected value does NOT have to be a possible outcome. XX canโ€™t actually equal 1.7, but 1.7 is the long-run average.


Interpretation on the AP Exam

โ€œIf we were to repeat this random process many, many times, the average value of XX would be approximately 1.7.โ€

Concept Check ๐ŸŽฏ

Expected Value Calculation ๐Ÿงฎ

A game costs $5 to play. You win $20 with probability 0.2, win $5 with probability 0.3, and win $0 with probability 0.5.

Let XX = net gain (winnings minus cost).

1) XX values: $15, $0, and โ€พ\underline{\quad} (third net gain value)

2) E(X)=?E(X) = ? (expected net gain)

3) Is this game favorable for the player? (yes or no)

Part 3: Variance & Standard Deviation

๐Ÿ“Š Variance & Standard Deviation of a Random Variable

Part 3 of 7 โ€” Spread of a Distribution


Variance

Var(X)=ฯƒX2=โˆ‘(xiโˆ’ฮผX)2โ‹…P(xi)\text{Var}(X) = \sigma_X^2 = \sum (x_i - \mu_X)^2 \cdot P(x_i)

Standard Deviation

ฯƒX=Var(X)\sigma_X = \sqrt{\text{Var}(X)}


Worked Example

Using our distribution: ฮผX=1.7\mu_X = 1.7

xxxโˆ’ฮผx - \mu(xโˆ’ฮผ)2(x - \mu)^2P(x)P(x)(xโˆ’ฮผ)2โ‹…P(x)(x-\mu)^2 \cdot P(x)
0-1.72.890.10.289
1-0.70.490.30.147
20.30.090.40.036
31.31.690.20.338

ฯƒ2=0.289+0.147+0.036+0.338=0.81\sigma^2 = 0.289 + 0.147 + 0.036 + 0.338 = 0.81 ฯƒ=0.81=0.9\sigma = \sqrt{0.81} = 0.9

๐Ÿ”‘ Standard deviation measures the typical distance of outcomes from the mean.

Concept Check ๐ŸŽฏ

Variance Drill ๐Ÿงฎ

A random variable XX has: ฮผ=3\mu = 3, and outcomes X=1,3,5X = 1, 3, 5 each with probability 1/31/3.

1) (1โˆ’3)2โ‹…(1/3)=?(1 - 3)^2 \cdot (1/3) = ? (first term of variance calculation)

2) (3โˆ’3)2โ‹…(1/3)=?(3 - 3)^2 \cdot (1/3) = ?

3) ฯƒ2=?\sigma^2 = ? (total variance, as a fraction like a/b)

Part 4: Cumulative Distributions and Simulation

โš–๏ธ Cumulative Distributions and Simulation

Part 4 of 7 โ€” Building and Estimating Distributions


Building a Distribution with Probability Rules

A bag holds 3 red and 2 blue marbles. Draw 2 without replacement and let XX = number of red marbles.

  • P(X=0)=25โ‹…14=0.10P(X = 0) = \frac{2}{5} \cdot \frac{1}{4} = 0.10
  • P(X=2)=35โ‹…24=0.30P(X = 2) = \frac{3}{5} \cdot \frac{2}{4} = 0.30
  • P(X=1)=35โ‹…24+25โ‹…34=0.60P(X = 1) = \frac{3}{5} \cdot \frac{2}{4} + \frac{2}{5} \cdot \frac{3}{4} = 0.60 (red then blue, or blue then red)

Cumulative Probability Distribution

A cumulative probability distribution lists P(Xโ‰คx)P(X \leq x) for each value xx:

xx012
P(X=x)P(X = x)0.100.600.30
P(Xโ‰คx)P(X \leq x)0.100.701.00
  • Each cumulative value adds the next probability.
  • The last cumulative value is always 1.
  • Recover an exact probability by subtracting neighbors: P(X=1)=0.70โˆ’0.10=0.60P(X = 1) = 0.70 - 0.10 = 0.60.

Concept Check ๐ŸŽฏ

Estimating a Distribution by Simulation

When the rules are hard to apply, simulate.

Setting: Each cereal box holds one of 3 prizes, equally likely. Let XX = number of different prizes in 4 boxes (XX = 1, 2 or 3).

Simulation with random digits:

  1. Let digits 1, 2, 3 stand for the three prizes; skip 0 and 4โ€“9.
  2. Read four usable digits (one per box) and record how many different prizes appear.
  3. Repeat many times.

Results of 50 repetitions:

xx123
Count22622
Estimated P(X=x)P(X = x)0.040.520.44
Estimated P(Xโ‰คx)P(X \leq x)0.040.561.00

The exact probabilities are 0.037, 0.519 and 0.444. With more repetitions, the estimates tend to get closer to them.

Simulation Practice ๐Ÿงฎ

A different simulation of the prize setting gives these counts in 80 repetitions: X=1X = 1: 4, X=2X = 2: 40, X=3X = 3: 36.

1) Estimated P(X=2)P(X = 2)? (2 decimals)

2) Estimated P(Xโ‰ค2)P(X \leq 2)? (2 decimals)

3) Estimated P(Xโ‰ฅ2)P(X \geq 2)? (2 decimals)

Part 5: Interpreting Expected Value and Standard Deviation

๐Ÿ”„ Interpreting Expected Value and Standard Deviation

Part 5 of 7 โ€” Using ฮผX\mu_X and ฯƒX\sigma_X in Context


Interpretation Templates

ParameterInterpretation
ฮผX\mu_X"If this random process were repeated many times, the average [value of XX in context] would be about [ฮผX\mu_X]."
ฯƒX\sigma_X"[XX in context] typically varies by about [ฯƒX\sigma_X] from the mean of [ฮผX\mu_X]."

Both are parameters: single fixed numbers that describe the distribution, given in the units of XX.


Worked Example: A Raffle

A school sells 500 raffle tickets at $2 each. One ticket wins $300 and four tickets win $50. Let XX = net gain for one ticket.

OutcomeXXP(X)P(X)
Grand prize$2981/500 = 0.002
Small prize$484/500 = 0.008
No prizeโˆ’-$2495/500 = 0.990

E(X)=298(0.002)+48(0.008)+(โˆ’2)(0.990)=0.596+0.384โˆ’1.98=โˆ’1.00E(X) = 298(0.002) + 48(0.008) + (-2)(0.990) = 0.596 + 0.384 - 1.98 = -1.00

Interpretation: Over many tickets, buyers lose about $1.00 per ticket on average. (The school raises about $1 per ticket.)

Concept Check ๐ŸŽฏ

Using ฯƒX\sigma_X to Compare Options

Two options can have the same mean but very different risk.

Delivery routeMean timeSD of time
Route A30 min2 min
Route B30 min9 min

On average both routes take 30 minutes, but Route B's times typically vary by about 9 minutes from that mean, so Route B is much less predictable. If a package must arrive within 35 minutes, Route A is the safer choice.

๐Ÿ”‘ Use the mean to compare typical outcomes and the standard deviation to compare consistency or risk.

Decisions with ฮผ\mu and ฯƒ\sigma ๐Ÿงญ

Mean and SD in Context ๐Ÿงฎ

The number of defective items in a box, XX, has P(X=0)=0.7P(X=0) = 0.7, P(X=1)=0.2P(X=1) = 0.2, P(X=2)=0.1P(X=2) = 0.1.

1) E(X)E(X)?

2) ฯƒX\sigma_X? (round to 2 decimals)

3) Over 100 boxes, about how many defective items in total would you expect?

Part 6: Problem-Solving Workshop

๐Ÿ† Problem-Solving Workshop

Part 6 of 7 โ€” AP-Style Problems


Strategy for Random Variable Problems

  1. Define the random variable in context and list its possible values
  2. Check that the probabilities are between 0 and 1 and sum to 1
  3. Calculate E(X)E(X) using โˆ‘xโ‹…P(x)\sum x \cdot P(x)
  4. Calculate ฯƒX\sigma_X using โˆ‘(xโˆ’ฮผX)2โ‹…P(x)\sqrt{\sum (x - \mu_X)^2 \cdot P(x)}
  5. Interpret in context for full AP credit

AP Exam Tip

When asked to interpret expected value: โ€œIf [process] were repeated many times, the average [variable] would be approximately [value].โ€

When asked to interpret standard deviation: โ€œThe [variable] typically varies by about [value] from the mean of [mean].โ€

Concept Check ๐ŸŽฏ

Insurance Problem ๐Ÿงฎ

An insurance company charges $300/year. Claims: $0 (prob 0.9), $1000 (prob 0.08), $5000 (prob 0.02).

1) Expected claim per customer?

2) Expected profit per customer?

3) Standard deviation of claims? (round to nearest dollar)

Part 7: Mixed Review

๐Ÿ“ Review & Applications

Part 7 of 7 โ€” Comprehensive Review


Key Formulas Summary

ConceptFormula
Valid distribution0โ‰คP(xi)โ‰ค10 \leq P(x_i) \leq 1 and โˆ‘P(xi)=1\sum P(x_i) = 1
Cumulative probabilityP(Xโ‰คx)P(X \leq x) = sum of P(xi)P(x_i) for all xiโ‰คxx_i \leq x
Expected valueE(X)=โˆ‘xiP(xi)E(X) = \sum x_i P(x_i)
VarianceVar(X)=โˆ‘(xiโˆ’ฮผX)2P(xi)\text{Var}(X) = \sum(x_i - \mu_X)^2 P(x_i)
Standard deviationฯƒX=Var(X)\sigma_X = \sqrt{\text{Var}(X)}

Common Mistakes on the AP Exam

  • Averaging the values without weighting them by their probabilities
  • Forgetting the square root when going from variance to standard deviation
  • Thinking E(X)E(X) has to be a possible value
  • Confusing โ€œexpected valueโ€ with โ€œmost likely valueโ€
  • Interpreting without context or units

Concept Check ๐ŸŽฏ

Final Challenge ๐Ÿงฎ

XX has P(X=0)=0.3P(X=0) = 0.3, P(X=1)=0.4P(X=1) = 0.4, P(X=4)=0.3P(X=4) = 0.3.

1) E(X)=?E(X) = ?

2) Var(X)=?\text{Var}(X) = ? (2 decimals)

3) ฯƒX=?\sigma_X = ? (round to 2 decimals)