Course contentsShow
← Data Science
Lesson 121 of 2,1454. Discrete Probability DistributionsFree lesson

Expected Value of Discrete Random Variables

Calculating the weighted average of all possible values using their probabilities as weights.

Expected Value of Discrete Random Variables

What you'll learn: How to calculate the "average outcome" of a random variable by weighting each possible value by its probability.

The Core Idea

The expected value (often written as E(X) or μ) is the long-run average you'd expect if you could repeat a random process infinitely many times. It's not about what you "expect" in everyday language—it's a weighted average of all possible values, where the weights are the probabilities.

Think of it like this: Imagine a carnival game where you can win $10 (20% of the time), $5 (50% of the time), or $0 (30% of the time). The expected value tells you the average amount you'd win per game over thousands of plays.

Calculating Expected Value

The formula is straightforward:

E(X) = Σ [x · P(X = x)]

For each possible value x the random variable can take:

  1. Multiply that value by its probability
  2. Add up all these products

Example

Using our carnival game:

  • E(X) = (10 × 0.20) + (5 × 0.50) + (0 × 0.30)
  • E(X) = 2 + 2.5 + 0
  • E(X) = $4.50

Even though you can never actually win $4.50 in a single game, over many plays you'd average $4.50 per game.

Why It Matters

Expected value is fundamental for:

  • Decision-making under uncertainty
  • Risk assessment
  • Comparing different random processes
  • Building more complex probability models

Key Takeaway: The expected value is the probability-weighted average of all possible outcomes—it represents the center of a discrete probability distribution and predicts long-run behavior.