Discrete Random Variables

Probability distributions for discrete variables

Discrete Random Variables

What is a Random Variable?

Random Variable: Variable whose value is determined by outcome of random process

Notation: Usually capital letters (X, Y, Z)

Discrete Random Variable: Takes on countable set of values (often integers)

Examples:

  • X = number of heads in 3 coin flips (X can be 0, 1, 2, or 3)
  • Y = number of students absent (Y can be 0, 1, 2, ...)
  • Z = sum when rolling two dice (Z can be 2, 3, ..., 12)

Probability Distribution

Probability Distribution: Lists all possible values and their probabilities

Requirements:

  1. Each probability between 0 and 1: 0 ≤ P(X = x) ≤ 1
  2. Probabilities sum to 1: ΣP(X = x) = 1

Example: Flip coin 2 times, X = number of heads

| X | P(X = x) | |---|----------| | 0 | 0.25 | | 1 | 0.50 | | 2 | 0.25 |

Sum: 0.25 + 0.50 + 0.25 = 1 ✓

Mean of Discrete Random Variable

Mean (Expected Value): μX\mu_X or E(X)

Formula:

μX=E(X)=xP(X=x)\mu_X = E(X) = \sum x \cdot P(X = x)

Interpretation: Long-run average if process repeated many times

Example: X = number of heads in 2 flips

μX=0(0.25)+1(0.50)+2(0.25)=0+0.50+0.50=1\mu_X = 0(0.25) + 1(0.50) + 2(0.25) = 0 + 0.50 + 0.50 = 1

Interpretation: On average, expect 1 head in 2 flips

Note: Mean doesn't have to be possible value! (E.g., average family has 2.3 children)

Variance and Standard Deviation

Variance: σX2\sigma_X^2 or Var(X)

Formula:

σX2=(xμX)2P(X=x)\sigma_X^2 = \sum (x - \mu_X)^2 \cdot P(X = x)

Alternative (easier calculation):

σX2=x2P(X=x)μX2\sigma_X^2 = \sum x^2 \cdot P(X = x) - \mu_X^2

Standard Deviation: σX=σX2\sigma_X = \sqrt{\sigma_X^2}

Example: X = heads in 2 flips (μ_X = 1)

σX2=(01)2(0.25)+(11)2(0.50)+(21)2(0.25)\sigma_X^2 = (0-1)^2(0.25) + (1-1)^2(0.50) + (2-1)^2(0.25) =1(0.25)+0(0.50)+1(0.25)=0.50= 1(0.25) + 0(0.50) + 1(0.25) = 0.50

σX=0.500.707\sigma_X = \sqrt{0.50} \approx 0.707

Alternative calculation:

σX2=[02(0.25)+12(0.50)+22(0.25)]12\sigma_X^2 = [0^2(0.25) + 1^2(0.50) + 2^2(0.25)] - 1^2 =[0+0.50+1]1=0.50= [0 + 0.50 + 1] - 1 = 0.50

Linear Transformations

If Y = a + bX:

μY=a+bμX\mu_Y = a + b\mu_X

σY=bσX\sigma_Y = |b|\sigma_X

Note: Adding constant shifts mean but doesn't change spread. Multiplying affects both.

Example: X = quiz score (0-10), μ_X = 7, σ_X = 2 Convert to percentage: Y = 10X

μY=10(7)=70%\mu_Y = 10(7) = 70\% σY=10(2)=20%\sigma_Y = 10(2) = 20\%

Example: Temperature conversion F = 32 + 1.8C If μ_C = 20°C, σ_C = 5°C:

μF=32+1.8(20)=68°F\mu_F = 32 + 1.8(20) = 68°F σF=1.8(5)=9°F\sigma_F = 1.8(5) = 9°F

Combining Independent Random Variables

If X and Y are independent:

Sum: Z = X + Y μZ=μX+μY\mu_Z = \mu_X + \mu_Y σZ2=σX2+σY2\sigma_Z^2 = \sigma_X^2 + \sigma_Y^2

Difference: W = X - Y μW=μXμY\mu_W = \mu_X - \mu_Y σW2=σX2+σY2\sigma_W^2 = \sigma_X^2 + \sigma_Y^2 (variances always add!)

Example: X = score on test 1 (μ = 80, σ = 10) Y = score on test 2 (μ = 75, σ = 12) Total = X + Y

μTotal=80+75=155\mu_{Total} = 80 + 75 = 155 σTotal=102+122=24415.6\sigma_{Total} = \sqrt{10^2 + 12^2} = \sqrt{244} \approx 15.6

Key: Standard deviations don't add; variances do!

Expected Value Applications

Fair game: E(winnings) = 0

Example: Pay 1,rolldie.Win1, roll die. Win 5 if roll 6, $0 otherwise.

E(net)=5(1/6)+(1)(5/6)=5/65/6=0E(net) = 5(1/6) + (-1)(5/6) = 5/6 - 5/6 = 0

Fair game!

Expected profit/loss:

Example: Lottery ticket costs 2,prize2, prize 1,000,000, probability 1/1,000,000

E(net)=999,998(1/1,000,000)+(2)(999,999/1,000,000)E(net) = 999,998(1/1,000,000) + (-2)(999,999/1,000,000) 12=$1\approx 1 - 2 = -\$1

Expect to lose $1 per ticket on average

Probability Histogram

Visual representation of probability distribution

  • X-axis: Values of X
  • Y-axis: Probabilities
  • Height of bar = P(X = x)
  • Bars don't touch (discrete)

Properties:

  • Area of bar = probability
  • Total area = 1

Common Notation

P(X = 3): Probability X equals 3
P(X ≤ 3): Probability X is at most 3 (cumulative)
P(X < 3): Probability X is less than 3
P(2 ≤ X ≤ 5): Probability X is between 2 and 5 inclusive

For discrete variables: P(X ≤ 3) includes P(X = 3)

Cumulative Distribution Function (CDF)

CDF: P(X ≤ x)

Sum probabilities up to and including x

Example: X has distribution in earlier example

P(X ≤ 1) = P(X = 0) + P(X = 1) = 0.25 + 0.50 = 0.75

Common Discrete Distributions

Binomial: Fixed trials, success/failure, constant probability
Geometric: Trials until first success
Poisson: Count of events in interval

(Each has its own topic with specific formulas!)

Common Mistakes

❌ Forgetting probabilities must sum to 1
❌ Confusing E(X) with most likely value
❌ Adding standard deviations instead of variances
❌ Forgetting absolute value for σ_Y when Y = a + bX
❌ Using variance formula when independence doesn't hold

Practice Strategy

  1. List: All possible values
  2. Find: Probability for each value
  3. Verify: Probabilities sum to 1
  4. Calculate: μ and σ using formulas
  5. Interpret: What do mean and SD tell us?

Quick Reference

Mean: μX=xP(X=x)\mu_X = \sum x \cdot P(X = x)

Variance: σX2=(xμX)2P(X=x)\sigma_X^2 = \sum (x - \mu_X)^2 \cdot P(X = x)

Linear Transform: Y = a + bX gives μ_Y = a + bμ_X, σ_Y = |b|σ_X

Sum/Difference: μ adds/subtracts, variances always add

Remember: Mean is long-run average. Standard deviation measures variability. For sums/differences of independent variables, variances add!

📚 Practice Problems

No example problems available yet.