What is Expected Value?. An intuitive explanation of expected... | by Devin Soni 👑 | Towards Data Science

Expected value is the average value of a random variable over a large number of experiments. A random variable maps numeric values to each possible outcome in an experiment. We can calculate expected value for a discrete random variable — one in which the number of potential outcomes is countable — by taking a sum in which each term is a possible value of the random variable multiplied by the probability of that outcome. So, for example, if our random variable were the number obtained by rolling a fair 3-sided die, the expected value would be (1 * 1/3) + (2 * 1/3) + (3 * 1/3) = 2.
If we assume the experiment to be a game, the random variable maps game outcomes to winning amounts, and its expected value thus represents the expected average winnings of the game. Since expected value spans the real numbers, it is typically segmented into negative, neutral, and positive valued numbers. Games with each type of expected value are frequent in real-life scenarios, so expected value provides a simple decision-making heuristic.
In order to exemplify each type of game, I will use 3 similar examples involving flipping a coin, so to be explicit, the random variable in each scenario is the expected winning from flipping the coin once. Assume that in every case, the coin is fair, so heads and tails are equally probable with a probability of 1/2.
You flip the fair coin. Every time you get heads, you lose $1, and every time you get tails, you gain $1.
The expected value in this scenario is (-1 * 1/2) + (1 * 1/2) = 0. Thus, since the coin is fair and the loss amount equals the gain amount, you are expected to neither gain nor lose money over time. In such a game, while there is no reason to play, there is also no reason not to play. These types of games are therefore ideal for simple recreation, such as with rock-paper-scissors, in which randomly choosing a move is the optimal strategy with an expected gain of 0.
You flip the fair coin. Every time you get heads, you lose $1, and every time you get tails, you gain $2.
The expected value in this scenario is (-1 * 1/2) + (2 * 1/2) = 1/2. Since heads and tails are equally-likely, the larger gain for tails outweighs the loss for heads. In such a game you are expected to gain money over time, so you should play this type of game. These type of scenarios appear in many real-life decisions, such as investing in the stock market (the markets are in a general uptrend over time), studying for an exam (the few hours of lost time are outweighed by a higher GPA), or preparing for an interview (a few weeks of lost time are outweighed by the benefits from having a better job).
You flip the fair coin. Every time you get heads, you lose $1, and every time you get tails, you gain $1. Additionally, there is a $0.01 fee for every flip regardless of the outcome.
The expected value in this scenario is (-1.01 * 1/2) + (.99 * 1/2) = -0.01. Thus, despite the coin itself being fair and the loss amount equalling the gain amount, the constant fee causes the game to be a negative-valued game. In such a game, you are expected to lose money over time, so you should not play this type of game. This is common in many gambling platforms, in which the house provides an initially-neutral game, but then cahrges a fee that ruins the neutrality of the game (hence the saying that “the house always wins”).
Thinking of decisions in terms of expected value is a simple way to decide whether or not there is economic reason to engage in an activity. Of course, there are ways to measure utility other than pure economic reward, so expected gain is not a foolproof decision-making tool. Additionally, keep in mind that expected value works over a large number of repeated trials, so this may provide distorted views of certain events in which some possibilities are very infrequent. For example, consider winning the lottery. It may very well be a positive expected value opportunity, but the chance that you actually realize this value in your finite lifetime is so low that it may not be worth buying lottery tickets.