What Is Expected Value?
The expected value (also called the mean or expectation) of a discrete random variable is the long-run average outcome you would expect if an experiment were repeated many times. It is found by multiplying each possible outcome by its probability and adding the products together. This calculator implements the formula \(E(X) = \sum_{i=1}^{n} x_i \cdot p_i\) for any list of outcomes and matching probabilities.
How to Use the Calculator
Enter your outcome values as a comma-separated list (for example 10, 20, 30) and the corresponding probabilities in the same order (for example 0.5, 0.3, 0.2). Each value is paired with the probability in the same position. The calculator returns the expected value, the number of terms used, and the sum of the probabilities so you can verify the distribution is valid (it should total 1).
The Formula Explained
$$E(X) = \sum_{i=1}^{n} x_i \cdot p_i$$ means: take each outcome \(x_i\), multiply it by its probability \(p_i\), then sum across all outcomes. Outcomes that are both large and likely contribute most to the expected value. If probabilities do not sum to 1, the result is technically a weighted sum rather than a true expectation — check the "Sum of probabilities" row.
Worked Example
Suppose a game pays $0, $5, or $20 with probabilities 0.5, 0.3, and 0.2. Then $$E(X) = (0\times0.5) + (5\times0.3) + (20\times0.2) = 0 + 1.5 + 4 = 5.5.$$ The expected payout is $5.50 per play.
FAQ
Do probabilities have to add to 1? For a valid probability distribution, yes. The calculator still computes the weighted sum if they don't, and shows the total so you can adjust.
Can outcomes be negative? Yes — losses or negative payoffs are entered as negative numbers, which is common in gambling and finance examples.
What if I enter different counts of values and probabilities? The calculator pairs items by position and uses only as many pairs as the shorter list provides.