A likely outcome is not always the best reason to act. Launching a website design might usually help, yet a small chance of an expensive failure could change the decision. Expected utility combines two questions: How likely is each outcome, and how valuable would it be? section 12.2 section 11.10
For each action, multiply every possible outcome’s utility by its probability, then add the results. This probability-weighted average is the action’s expected utility. Bayesian decision theory chooses the action with the highest expected utility—not necessarily the action with the most likely favorable outcome. section 12.2
Should the new design launch?
Suppose launching yields a utility of 100,000 with probability 0.97 and a utility of −20,000 with probability 0.03. Its expected utility is 0.97 × 100,000 + 0.03 × (−20,000) = 96,400. Not launching yields 0, so launching wins under these utilities. If the loss were much larger, the preferred action could reverse even though success remained likely. section 12.2 section 11.10
Possible outcomes need not fit into a few categories. If an unknown conversion rate can take a continuous range of values, define utility for each rate and average it against the rate’s probability distribution. When that integral is difficult, draw many rates, calculate the utility of launching at each one, and average those utilities. In one such setup, the sample-based estimate is about $107,496 for launching versus $100,000 for not launching. section 12.5
np.random.seed(0)
r_samples = np.random.beta(
64, 438, #A
size=100_000 #B
)
utility_samples = utility_launch(r_samples) #C
expected_utility = utility_samples.mean() #DThe NumPy listing draws 100,000 possible conversion rates, turns them into utility samples, and averages those samples to approximate expected utility. section 12.5
For a sequence of decisions, immediate expected utility may not tell the whole story. Trying a policy can reveal its payoff before deciding whether to try another. Work backward through the possible outcomes: compare later actions at each decision point, then use those choices to evaluate the first action. This captures the value of adapting, though traversing every branch becomes computationally costly over longer sequences. section 12.7 section 12.8 section 12.10


