All Tools

Expected Value & Decision Trees

Explore the math behind risk and reward. Calculate expected value for any set of outcomes, build decision trees with fold-back analysis, and compare insurance plans to find the best deal.

Outcomes

Value ($)
P
Value ($)
P
Expected Value
-$5.00
Variance
4725.00
Std Deviation
68.74

Step-by-Step Calculation

E(X)=xipi=(100)(0.3)+(50)(0.7)=5.0000E(X) = \sum x_i \cdot p_i = (100)(0.3) + (-50)(0.7) = -5.0000
Variance: σ2=E(X2)[E(X)]2=4725.0000\sigma^2 = E(X^2) - [E(X)]^2 = 4725.0000
Standard Deviation: σ=4725.0000=68.7386\sigma = \sqrt{4725.0000} = 68.7386

Outcomes Weighted by Probability

Win
$30.00 (30.0%)
Lose
-$35.00 (70.0%)
Bars show xᵢ × pᵢ contribution to E(X). Green = positive, red = negative.

Reference Guide

Expected Value Formula

The expected value is the long-run average outcome of a random event. Multiply each outcome by its probability and add the results together.

E(X)=i=1nxipiE(X) = \sum_{i=1}^{n} x_i \cdot p_i

A positive expected value means you gain on average over many repetitions. A negative expected value means a loss. Variance and standard deviation tell you how spread out the outcomes are around the mean.

Var(X)=E(X2)[E(X)]2\text{Var}(X) = E(X^2) - [E(X)]^2

Decision Trees

A decision tree maps out choices and uncertain events. Square nodes represent decisions you control. Circle nodes represent chance events with known probabilities.

The fold-back method solves the tree from right to left. At each chance node, compute the EMV (expected monetary value). At each decision node, pick the branch with the highest EMV.

EMVchance=pi×(payoffi+EMVchild)EMV_{\text{chance}} = \sum p_i \times (\text{payoff}_i + EMV_{\text{child}})

Insurance Expected Cost

Insurance is a trade-off between a certain cost (the premium) and uncertain costs (out-of-pocket expenses). The expected annual cost combines both.

Cost=Premium+f×E(OOP per claim)\text{Cost} = \text{Premium} + f \times \text{E}(\text{OOP per claim})

The break-even claim frequency tells you how many claims per year would make the insurance worth its premium compared to self-insuring.

Risk vs Return

Two gambles can have the same expected value but very different risk. The standard deviation measures this spread. A risk-averse person prefers lower variance even at the cost of a slightly lower expected value.

Casino games always have negative expected value for the player. A lottery ticket might cost $2 with an EV of roughly -$1. Roulette has an EV of about -5.3 cents per dollar bet. The house edge ensures the casino profits in the long run.