Mean Discrete Random Variable- Calculating Expected Values

What Is a Discrete Random Variable?

A discrete random variable takes on specific, separate values. These aren't measurements that can be split into fractions. We're talking about counts—number of heads in 10 coin flips, number of emails arriving per hour, number of defective items in a batch.

The variable can only take values like 0, 1, 2, 3... never 1.5 or π. That's the deal with discrete.

The Expected Value (Mean) Explained

The expected value is the long-run average you'd see if you repeated an experiment infinite times. It's not a value you'll actually observe in a single trial. That's important to understand upfront.

If you roll a fair die 100,000 times and average the results, you'll get something close to 3.5. That's the expected value. No single die roll gives you 3.5, but the mean of many rolls converges to it.

The Formula

For a discrete random variable X with possible values x₁, x₂, x₃... xₙ and corresponding probabilities P(X = xᵢ), the expected value is:

E(X) = Σ [xᵢ × P(X = xᵢ)]

That's it. Multiply each outcome by its probability, then sum everything up.

Working Through a Real Example

Let's say a game costs $5 to play. You flip two fair coins. If both are heads, you win $20. Otherwise, you win nothing.

What's the expected value of your profit?

Step 1: Define the random variable

Let X = profit from playing once.

X = $20 - $5 = $15 when you win
X = $0 - $5 = -$5 when you lose

Step 2: Find the probabilities

P(both heads) = ¼ = 0.25
P(not both heads) = ¾ = 0.75

Step 3: Apply the formula

E(X) = (15 × 0.25) + (-5 × 0.75)
E(X) = 3.75 - 3.75
E(X) = $0

The game is fair. Over many plays, you'd break even on average.

Common Mistakes to Avoid

Properties of Expected Value

These rules make calculations easier when you're dealing with multiple variables:

Expected Value vs. Variance

Don't confuse these. Expected value measures the center of the distribution. Variance measures how spread out the values are around that center.

Two games might both have E(X) = $10, but one could have you winning $10 every time while the other has you oscillating between $0 and $20. The variance tells you which.

Comparison: Expected Value Calculations

Scenario Values (x) Probabilities P(x) E(X) Calculation Result
Fair coin flip 0, 1 0.5, 0.5 (0×0.5)+(1×0.5) 0.5
Loaded die 1, 2, 3, 4, 5, 6 0.1, 0.1, 0.1, 0.1, 0.1, 0.5 Σ(x × P(x)) 4.5
Investment A -100, 200 0.4, 0.6 (-100×0.4)+(200×0.6) 80
Investment B -50, 100 0.3, 0.7 (-50×0.3)+(100×0.7) 55

When Expected Value Lies to You

Consider a lottery: 1 in 300 million chance to win $100 million. Ticket costs $2.

E(X) = (-2 × 0.999999997) + (99999998 × 0.000000003) ≈ -$1.67

Technically positive expected value doesn't exist here. But even if it did, the variance is astronomical. You'd need to play millions of times before converging to the mean. Nobody does that.

Expected value is a theoretical tool. It doesn't tell you what happens in practice with limited trials.

How to Calculate Expected Value: Step-by-Step

  1. List all possible outcomes. Write down every value your random variable can take.
  2. Assign probabilities. Each outcome gets a probability between 0 and 1. They must sum to exactly 1.
  3. Multiply each outcome by its probability. This gives you the weighted contribution of each outcome.
  4. Sum all the products. That's your expected value.
  5. Interpret the result. Remember—this is a long-run average, not a guaranteed outcome.

Practical Applications

Expected value shows up everywhere once you know what to look for:

The Bottom Line

Expected value is straightforward arithmetic: multiply outcomes by probabilities, then add. The math isn't hard. The hard part is correctly identifying what outcomes and probabilities actually apply to your situation.

Most errors come from incomplete lists of outcomes, incorrect probability assignments, or forgetting to include costs and benefits that affect the final values. Get those right, and the calculation takes care of itself.