All Labs

Decision Trees & Risk Analysis Lab

Model decisions under uncertainty with interactive decision trees. Compute expected values at every node, trace the optimal strategy, and explore how changing probabilities affects the best choice through sensitivity analysis.

Guided Experiment: Expected Value and Optimal Strategy

How does expected value determine the optimal choice at a decision node? Can the option with the worst possible outcome still be the best choice overall?

Write your hypothesis in the Lab Report panel, then click Next.

Decision Tree

DecisionChanceOutcomeOptimal path
CarryRainp=0.3 | $-2No rainp=0.7 | $-5Don't carryRainp=0.3 | $-10No rainp=0.7 | $0Carry umbrella?EV=-3WeatherEV=-4.1Dry but burdenedCarried for no…WeatherEV=-3SoakedFree and dry

Controls

Should you carry an umbrella? Weighs inconvenience vs getting soaked.

Click a node in the tree diagram to edit it. You can change labels, add children, adjust probabilities, or remove branches.

Analysis Results

Expected Value Formula
EV=i=1npi×payoffiEV = \sum_{i=1}^{n} p_i \times \text{payoff}_i
Expected Value
$-3
Risk Level
Low
Best Case
$0
Worst Case
$-10

Strategy Comparison

Carry
EV = $-4.1
Don't carry
EV = $-3

Possible Outcomes

PayoffProbabilityWeighted
$-20.3$-0.6
$-50.7$-3.5
$-100.3$-3
$00.7$0

Sensitivity Analysis

-5-4-4-3-200.250.50.751CarryDon't ca…Probability
CarryDon't carry

Data Table

(0 rows)
#ScenarioStrategyExpected ValueBest CaseWorst CaseRisk Level
0 / 500
0 / 500
0 / 500

Reference Guide

Expected Value

The expected value is the weighted average of all possible outcomes, where each outcome is weighted by its probability.

EV=i=1npi×payoffiEV = \sum_{i=1}^{n} p_i \times \text{payoff}_i

For a coin flip paying $10 on heads and $0 on tails, EV = 0.5 × $10 + 0.5 × $0 = $5.

Decision Nodes and Strategy

At a decision node (shown as a diamond), the decision maker picks the option with the highest expected value. This is the "fold-back" or backward induction method.

EVdecision=maxi{EV(optioni)}EV_{\text{decision}} = \max_i \{ EV(\text{option}_i) \}

Starting from the leaves, compute EVs backwards to the root. The optimal strategy emerges as the path of best choices.

Chance Nodes and Probability

At a chance node (shown as a circle), nature picks the outcome. Each branch has a probability, and all probabilities must sum to 1.

i=1npi=1and0pi1\sum_{i=1}^{n} p_i = 1 \quad \text{and} \quad 0 \le p_i \le 1

The EV at a chance node is the probability-weighted sum of child values.

Sensitivity Analysis and Risk

Sensitivity analysis shows how the optimal decision changes as a probability varies. The crossover point is where two strategies have equal EV.

EVA(p)=EVB(p)    p=crossoverEV_A(p) = EV_B(p) \implies p^* = \text{crossover}

Risk profile compares best case, worst case, and expected value. A risk-averse decision maker may prefer lower EV with smaller downside.