Omni Calculator logo

Expected Value Calculator

Created by Rita Rain
Reviewed by Dominik Czernia, PhD and Jack Bowater
Last updated: Feb 07, 2024

If "How to calculate expected value?" is the question that's troubling you, here is the solution - the expected value calculator. Simply input the values and their probabilities and it will do the rest. If you're not yet very familiar with what the probabilities are, make sure to first visit our probability calculator.

From the text below, you can learn the expected value formula, the expected value definition, and how to find expected value by hand.

What is the expected value?

The expected value is an approximation of the mean of a random variable - a prediction of what an average would equal to if we were to repeat the experiment many times. For example, if we were to roll a die a thousand times, what would be the most likely average of outcomes? This number is called the expected value.

💡 The expected value of a random variable is a theoretical counterpart of the average of a sample.

Expected value formula

Mathematically speaking, the expected value of a random variable XX is the sum of each possible value xx of XX, multiplied by the probability of that value, P(x)P(x).

Have a look at the expected value formula:

E(X)=x1P(x1)++xnP(xn)\small E(X) = x_1 \cdot P(x_1) + \ldots + x_n \cdot P(x_n)

where P(xi)P(x_i) is the probability of value xix_i occurring (i=1,,ni = 1, \ldots, n) and nn the number of all all possible values assumed by our random variable.

We can rewrite the above formula using the summation sign as

E(X)=i=1nxiP(xi)\small E(X) =\sum_{i=1}^n x_i \cdot P(x_i)

If you've already visited our weighted average calculator, you may have noticed that finding the expected value is similar to calculating weighted average, but instead of weights we use probabilities.

How to use the expected value calculator?

Let's first learn how to find the expected value when you don't have time for manual calculations.

Input values of your random variables along with their probabilities into the calculator. You can enter up to 20 numbers. New rows will appear when you fill the last field as long as you provided both the value and its probability.

Remember that probability can't be less than zero, nor greater than one (probability equal to zero means that something never happens, and one means it is 100% certain).

The sum of all probabilities must be also equal to exactly one. The calculator will display a warning message, which will disappear once the numbers are correct.

Once the probabilities are correct and add up to 1, what the expected value is will display at the bottom.

How to calculate the expected value? - examples

As a part of the expected value examples, we'll now calculate the expected value of a dice roll.

We have six possible outcomes of a roll: 1, 2, 3, 4, 5, 6. All outcomes are equally probable, so the probability of any of them equals 1/6. Now we just have to substitute everything into the expected value equation:

E(x) = 1 * 1/6 + 2 * 1/6 + 3 * 1/6 + 4 * 1/6 + 5 * 1/6 + 6 * 1/6

E(x) = 21/6

E(x) = 3.5

The final result obtained from the above expected value definition is 3.5. You can verify this result with our dice roller calculator.

Let's now go through a more practical expected value example.

You and a friend are arranging a bet. He'll give you $100 if you win, and you give him only $45 if he wins. You assessed the probability that you'll win is 35% and the chance of your friend winning for 65%. Should you take the bet? You can use the expected value equation to answer the question:

E(x) = 100 * 0.35 + (-45) * 0.65 = 35 - 29.25 = 5.75

The expected value of this bet is $5.75. The result suggests you should take the bet. If you play many games in which the expected value is positive, the gains will outweigh the costs in the long run.


How to find the expected value?

To find the expected value, use the formula:
E(x) = x1 * P(x1) + ... + xn * P(xn).
In other words, you need to:

  1. Multiply each random value by its probability of occurring.
  2. Sum all the products from Step 1.
  3. The result is the expected value.

Can the expected value be negative?

Yes, the expected value can be negative. For example, let's consider this scenario: 10 students answer a questionnaire, which asks them to rate their classes from -2 to 2. Five students give a rating of -2, two give 1, and three give 0. In this case, the expected value would be 5/10 × (-2) + 2/10 × 1 + 3/10 × 0 = -0.8.

How do you calculate the expected value in a chi-square?

To calculate the expected value for a given cell in a two-way table:

  1. Sum the numbers in the cell's row.

  2. Sum the numbers in the cell's column.

  3. Sum all the cells in the table.

  4. To find the expected value for a given cell, multiply its row sum (Step 1) by its column sum (Step 2) and divide by the sum of all cells (Step 3).

Rita Rain
You can enter up to 20 values (new rows will appear). Input the probabilities in their decimal form and make sure they all add up to 1.
Check out 33 similar probability theory and odds calculators 🎲
AccuracyBayes theoremBertrand's box paradox… 30 more
People also viewed…

Black Friday

How to get best deals on Black Friday? The struggle is real, let us help you with this Black Friday calculator!

Circle skirt

Circle skirt calculator makes sewing circle skirts a breeze.

Pie chart angle

With this pie chart angle calculator, you will be able to quickly create pretty pie charts!

Weibull distribution

Use this Weibull distribution calculator if you need find probabilities, quantiles, etc. in the Weibull distribution, or generate samples from this distribution.