Expected Value Calculator
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.
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.
Expected value formula
Mathematically speaking, the expected value is the sum of each random value, x
, multiplied by the probability of that value, P(x)
.
Have a look at the expected value formula:
∑(x_{i} * P(x_{i})) = x_{1} * P(x_{1}) + x_{2} * P(x_{2}) + ... + x_{n} * P(x_{n})
Let's explain the meaning of the symbols:

∑
 The sum of all elementsi
; 
x_{i}
 The value of a random variable; 
P(x_{i})
 The probability of valuex_{i}
occurring; and 
n
 The number of all random variables.
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
Finding the expected value is similar to calculating weighted average, but instead of weights we deal with probabilities.
As a part of the expected value examples, we'll now calculate the expected value of a die 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) = x_{1} * P(x_{1}) + x_{2} * P(x_{2}) + ... + x_{6} * P(x_{6})
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.
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.
FAQ
How to find the expected value?
1.To find the expected value, use the formula:
E(x) = x_{1} * P(x_{1}) + x_{2} * P(x_{2}) + ... + x_{n} * P(x_{n})
.
Substitute your values into the formula and solve it, or do it one by one:

Multiply each random value by its probability of occurring.

Sum all the products from Step 1.

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, three give 1, and two 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 chisquare?
To calculate the expected value for a given cell in a twoway table:

Sum the numbers in the cell's row.

Sum the numbers in the cell's column.

Sum all the cells in the table.

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).
For example, for the "a" cell in the below example, the expected value would equal
(a + b) × (a + c) / (a + b + c + d)
.
Type1  Type 2  

Category 1  
Category 2 