Probability
Expected Value Calculator
Turn a list of values and probabilities into an expected value and a variance, and warn when the probabilities do not add to about 1.
Worksheet
Press Calculate to see the result.
Turn a list of values and probabilities into an expected value and a variance, and warn when the probabilities do not add to about 1.
What this calculator answers
Expected value is the probability-weighted average of a list of outcomes. A game payout, a discrete insurance loss, or a small menu of project returns can be written as lines of value and probability. This page multiplies each value by its probability and adds those products. It also builds the variance from the second moment minus the square of the expected value. If the probabilities miss 1 by more than 0.02, the page still computes the weighted sum you typed and, in the steps and the note, offers the version that rescales the probabilities so they add to 1.
Each line contributes x times p to the expected value and x squared times p to the second moment. The variance is the second moment minus the square of the expected value. The normalized expected value divides every probability by the sum of the probabilities before repeating that sum. Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.
The formula, written out
Discrete expected value and second-moment variance uses this relationship.
E(X) = Σ x p, Var(X) = Σ (x^2 p) − [E(X)]^2
- x. An outcome value on one line.
- p. The probability typed beside that value.
- Σ x p. The expected value, using the probabilities as typed.
- Σ p. The total probability, which should be near 1.
The expected value is the center of mass of point masses p sitting at locations x. The second moment is the same kind of average of the squared locations. Subtracting the square of the center removes the part of the second moment that is only the location of the center, leaving the spread. Rescaling by the sum of p is a separate repair for a list that was not a complete distribution. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.
A full worked example
Example loaded in the worksheet
The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.
There are 3 lines of value and probability. The products are 1 × 0.2 = 0.2, 2 × 0.5 = 1, 4 × 0.3 = 1.2. The expected value is the sum of those products, 2.4.
The second moment is 7. The variance is 7 − (2.4)^2 = 1.24. The probabilities sum to 1.
The normalized expected value, dividing each probability by 1, is 2.4. That sum is within 0.02 of 1, so no normalization warning is attached. The normalized value 2.4 agrees with the headline up to that tolerance.
| Expected value | 2.4 |
|---|---|
| Variance | 1.24 |
| Sum of probabilities | 1 |
| Normalized expected value | 2.4 |
A second situation
Probabilities that add to 0.60 rather than 1
There are 3 lines of value and probability. The products are 1 × 0.2 = 0.2, 2 × 0.2 = 0.4, 4 × 0.2 = 0.8. The expected value is the sum of those products, 1.4.
The second moment is 4.2. The variance is 4.2 − (1.4)^2 = 2.24. The probabilities sum to 0.6.
The normalized expected value, dividing each probability by 0.6, is 2.3333. That sum is more than 0.02 away from 1, so the note warns you, and both the typed expected value and the normalized one are offered.
| Expected value | 1.4 |
|---|---|
| Variance | 2.24 |
| Sum of probabilities | 0.6 |
| Normalized expected value | 2.3333 |
The probabilities sum to 0.6, which is more than 0.02 away from 1. The expected value uses the probabilities as typed. The normalized expected value is 2.3333.
When the typed probabilities add to 0.60, the unnormalized expected value treats the missing 0.40 as absent rather than redistributing it. The normalized value spreads that missing mass in proportion to the probabilities you did type. Both numbers are shown so you can see which question you asked. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.
What moves when the input moves
The high outcome moved from 4 to 6 and kept probability 0.30. The headline result went from 2.4 to 3.
The nudged inputs
There are 3 lines of value and probability. The products are 1 × 0.2 = 0.2, 2 × 0.5 = 1, 6 × 0.3 = 1.8. The expected value is the sum of those products, 3.
The second moment is 13. The variance is 13 − (3)^2 = 4. The probabilities sum to 1.
The normalized expected value, dividing each probability by 1, is 3. That sum is within 0.02 of 1, so no normalization warning is attached. The normalized value 3 agrees with the headline up to that tolerance.
| Expected value | 3 |
|---|---|
| Variance | 4 |
| Sum of probabilities | 1 |
| Normalized expected value | 3 |
How to read the result
Read the headline as a long-run average per play, not as an outcome you are guaranteed to see. Read the variance in the square of the value's unit. A note about the probability sum means the list is not yet a complete distribution. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.
Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.
Assumptions that have to stay true
- Each line is one outcome and its probability.
- The values are on an additive scale.
- A probability is between 0 and 1.
- Lines are mutually exclusive outcomes of one random variable, not a sample of data.
If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.
Mistakes that change the answer
- Averaging the values and ignoring the probabilities. That is an ordinary mean, and only if every row was equally likely.
- Stopping when the probabilities sum to 0.90 and still calling the result a complete expectation without reading the warning.
- Subtracting the expected value inside the sum and then forgetting to square, which is not this variance formula.
- Typing percents such as 20 instead of 0.20.
Where a different calculator is the honest choice
Use the mean calculator when you have a sample of equally weighted observations and no probabilities. Use the binomial calculator when the distribution is a count of successes rather than a hand-typed list. Use the probability calculator for a single event rule rather than a weighted average of values. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.
When the job changes, move to a page built for that job: Probability Calculator, Binomial Distribution Calculator, Mean Calculator.
Check yourself
Outcomes 1, 2, and 4 have probabilities 0.20, 0.50, and 0.30. What is the expected value, and what is the variance?
The probabilities sum to 1. The expected value is 0.20 + 1.00 + 1.20 = 2.4. The second moment is 7, and the variance is 7 − 2.4 squared = 1.24.
Using the result in a sentence
Simple gambles, discrete loss models, and classroom tables of x and P(X = x) are the lists this page is built to read. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.
A discrete list cannot represent a continuous distribution. The variance formula here is the probability-weighted second moment. It is not the sample variance that divides by n − 1, and it goes wrong if the lines overlap or leave out an outcome you still consider possible. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.
Questions people ask next
01What definition does the Expected Value Calculator commit to?
This page uses Discrete expected value and second-moment variance: E(X) = Σ x p, Var(X) = Σ (x^2 p) − [E(X)]^2. The expected value is the center of mass of point masses p sitting at locations x. The second moment is the same kind of average of the squared locations. Subtracting the square of the center removes the part of the second moment that is only the location of the center, leaving the spread. Rescaling by the sum of p is a separate repair for a list that was not a complete distribution. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for Values and probabilities, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.
02How should the worked example be read out loud?
In the loaded example the expected value is 2.4. Read the headline as a long-run average per play, not as an outcome you are guaranteed to see. Read the variance in the square of the value's unit. A note about the probability sum means the list is not yet a complete distribution. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.
03What is the fastest way to get a misleading result?
Averaging the values and ignoring the probabilities. That is an ordinary mean, and only if every row was equally likely. A discrete list cannot represent a continuous distribution. The variance formula here is the probability-weighted second moment. It is not the sample variance that divides by n − 1, and it goes wrong if the lines overlap or leave out an outcome you still consider possible. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.
04When should I leave this page for a different calculator?
Use the mean calculator when you have a sample of equally weighted observations and no probabilities. Use the binomial calculator when the distribution is a count of successes rather than a hand-typed list. Use the probability calculator for a single event rule rather than a weighted average of values. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.
05What belongs in the sentence next to the number?
The probabilities sum to 1. The expected value is 0.20 + 1.00 + 1.20 = 2.4. The second moment is 7, and the variance is 7 − 2.4 squared = 1.24. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.