Loading...
Loading...
Calculate the expected value (weighted average) of a random variable. Useful for gambling, investment decisions, and understanding average outcomes over time.
Expected value (also called expectation, mean, or average) is the long-run average value of a random variable over many repetitions. It represents what you expect to get "on average" when an experiment is repeated many times.
E(X) = Expected value of random variable X
x_i = Each possible outcome value
P(x_i) = Probability of outcome x_i
Σ = Sum over all possible outcomes
Multiply each possible outcome by its probability, then add all these products together. The result is your expected value.
Expected value is a weighted average where probabilities are the weights. Outcomes with higher probability contribute more to the expected value.
E(X) represents what happens on average over many trials. A single trial may differ significantly from E(X), but the average will converge to E(X).
E(X) may not be a value you can actually observe. For a die roll, E(X) = 3.5, but you can never roll 3.5. It is a theoretical average.
For E(X) to be valid, the probabilities of all outcomes must sum to exactly 1. Otherwise, the calculation is meaningless.
One of the most powerful properties of expected value is that it is linear. This means:
Linearity works even when X and Y are dependent! You do not need independence to add expected values. This makes many problems much simpler.
What is the expected value when rolling a fair 6-sided die?
The expected value of a die roll is 3.5.
Determine if a bet is favorable (positive EV), unfavorable (negative EV), or fair (zero EV). Casinos ensure all games have negative EV for players.
Insurance companies use expected value to price policies. Premium = E(payout) + profit margin.
Compare investments by their expected returns. Higher E(return) with same risk is better.
Predict average defect rates, production costs, and resource requirements.
| Distribution | E(X) | Example |
|---|---|---|
| Fair n-sided die | d6: | |
| Binomial(n, p) | 10 coin flips: heads | |
| Geometric(p) | Flips until heads: | |
| Poisson(λ) | λ = 3 events/hour: E = 3 | |
| Uniform(a, b) | Uniform(0, 10): E = 5 |