Expected Value

A track of P75 · Dice, Expected Value & Decisions.

Comparing choices by their numbers: the expected value of an attack, then the spread around it and the risk of ruin, for when the average is not enough.

When a choice has uncertain outcomes, its expected value is the average result you would get if you made it many times: each outcome weighted by its chance, then added up. This track uses it to choose, and then shows where it is not enough.

The first lesson compares two attacks: a sword that hits more often for less damage, and an axe that hits less often for more. Weighting each attack's average damage by its chance to hit gives 4.5 for the sword and 5 for the axe, so the axe is better on average. The second lesson looks past the average: two choices with the same average can have very different spreads, and when a character has one hit point left, the chance of losing everything, the risk of ruin, decides between them.

Each number is computed exactly and then checked by simulating ten thousand attacks or fights. The same idea, an average over many random tries, is how a program scores a move it cannot search to the end, in a later pillar of Game Boards, Minimax, Pruning & Evaluation.

Outcomes and chanceswhat can happenThe expected valuesum of value × chanceThe spread and ruinwhat the average hides
Choosing by the average, and knowing when not to.
Expected Value — TransformerLab