2025-11-10

Expected Value Definition

In the theoretical sense, Expected Value (EV) is the return you can expect for some kind of action. In the common sense this could apply to things such as rolling a die or buying a lottery ticket while in the more practical context, this could apply to investments regarding their returns in relation to the risks.

Expected Value Formulas

  • The basic EV formula/Binomial Random Variable: \[ (P(x) * n) \] Where P(x) is the probability of x event and n is the amount of times the event happens/probability of success for x respectively.

  • The EV formula for multiple events: \[ E(x) = \sum(X) * P(X) \] The equation is basically the same, but here you are adding the sum of all the gains multiplied by their individual probabilities instead of just one probability.

  • There are also EV formulas for continuous and discrete variables but I will not cover them.

Expected Value Examples

-The St. Petersburg Paradox Game proposes a game of chance where a fair coin is tossed at each stage. The initial stake begins at 2 dollars and is doubled every time tails appears. The first time heads appears, the game ends and the player wins whatever is the current stake.

-Thus the player wins 2 dollars if heads appears on the first toss, 4 dollars if tails appears on the first toss and heads on the second, 8 dollars if tails appears on the first two tosses and heads on the third, and so on.

-Then it poses the question of what would be a fair price to pay to enter the game which can be seen with the following graph that shows a snippet of the first 10 flips.

St. Petersburg Paradox Game Winnings Chart (10 flips)

St. Petersburg Paradox Game EV

To answer the question of what would be a fair price to pay to enter the game, we can use the EV formula to calculate the EV of our winnings.

Our EV would be the chance of getting n tails in a row multiplied by the winnings which is: \[ E(x) = \sum_{n=1}^{\infty}\frac{1}{2^n}*2^n \]

This simplifies to \[ E(x) = \sum_{n=1}^{\infty}1 \]

St. Petersburg Paradox Game Cont.

Essentially the EV for each round of the game played is a net gain of $1 which continues infinitely as the game goes on. Based on the calculations of the EV, you can win an infinite amount of money playing this game, but this is exactly why this is a paradox because instictively, not many would even pay to play this game at all let alone pay a huge sum of money regardless of the winnings probability.

EV of Movies Rating by Genres in ggplot2movies

EV with discrete variables is functionally the same as the mean.

EV of Movies Rating by Genres in ggplot2movies Cont.

  • Here is the code I used to generate the previous graph
genres <- c("Action", "Animation", "Comedy", "Drama", "Documentary", "Romance", "Short")
avg_rating <- sapply(genres, function(g) {mean(movies$rating[movies[[g]] == 1], na.rm = TRUE)})
genres_byrating <- data.frame(genre = genres, rating = avg_rating)
ggplot(data = genres_byrating, aes(x = genre, y = rating, fill = genre)) +
  geom_bar(stat = "identity", width = 0.5) +
  theme_minimal()

EV of Movies Rating by Genres in ggplot2movies Cont.

Statistics like this can be useful for investors or decision makers behind the future projects on genres of the movies, length, budget, mpaa rating and other factors based on the higher EV of ratings derived from these factors.

EV are also useful for the common life without much calculations which can be seen by the next application to ggplot2movies.

EV of Movies Length by Year of Release Grouped by Budget

Data has been filtered for movies less than 180 minutes and has more than 10000 IMDB users ratings for the sake of demonstration.

EV of Movies Length by Year of Release Grouped by Genres Cont.

In a common scenario at home, its plausible that most people wouldn’t want a movie over 3 hours long and using the threshold of 10000 IMDB users ratings limit the volatility of the ratings caused by small sample size. Based on the desire or the mood of the person based on the day, keeping a note of the previous data in mind, if an individual would rather enjoy a higher budget film then they would choose releases near the year 2000 based on the EV. But if an individual would rather enjoy a higher rated movie, they would mostly pick releases before 1980 based on the ratings EV.