Overview

12 Bayesian decision theory: Making choices under uncertainty and risks

Bayesian decision theory shifts the focus from merely estimating what is true to deciding what to do under uncertainty. The core idea is to combine beliefs about unknown outcomes with preferences over those outcomes, expressed through utility or cost, and then choose the action with the best overall tradeoff. In the website example, launching or not launching a redesign depends not just on the probability of a good conversion rate, but on how valuable each possible outcome is and what it would cost to act.

The central rule is to maximize expected utility. For simple problems, this can be done by listing possible outcomes, assigning each a utility, weighting by probability, and averaging. The chapter then extends this idea to continuous settings, where utility becomes a function over all possible values of an unknown quantity and expected utility is computed by integration or approximated with Monte Carlo samples. This same framework also applies to other choices, such as deciding among policies with different costs, payoffs, and probabilities of success.

The chapter then broadens the picture to sequential decision making, where choices today affect what can be learned and done later. By evaluating decisions backward through a search tree, Bayesian decision theory can choose actions that balance immediate reward with future opportunity, revealing the tension between exploitation and exploration. Because exact long-horizon planning is often computationally expensive, the chapter also introduces practical approximations such as upper confidence bound, Thompson sampling, and Monte Carlo tree search, each offering a different way to manage uncertainty and search efficiently.

A tree representation of the current problem of decision making under uncertainty. Each rectangle represents a possible scenario that might take place with corresponding probabilities, while each circle represents an action we can take.
A tree representation of the current problem of decision making under uncertainty. Each rectangle represents a possible scenario that might take place with corresponding probabilities, while each circle represents an action we can take.
While traversing from a leaf node to an action node, we multiply the utility we obtain in the leaf node by the probability that we do obtain the utility.
While traversing from a leaf node to an action node, we multiply the utility we obtain in the leaf node by the probability that we do obtain the utility.
After adding up the weighted utilities associated with each action, we obtain the action’s expected utility. The action with the highest expected utility is chosen by Bayesian decision theory.
After adding up the weighted utilities associated with each action, we obtain the action’s expected utility. The action with the highest expected utility is chosen by Bayesian decision theory.
Given a continuous utility function that depends on the specific value of the conversion rate 𝑟, the circle node corresponding to the decision to launch now has infinitely many branches, each yielding the utility under a particular value of 𝑟, three examples of which are shown.
Given a continuous utility function that depends on the specific value of the conversion rate 𝑟, the circle node corresponding to the decision to launch now has infinitely many branches, each yielding the utility under a particular value of 𝑟, three examples of which are shown.
The utility obtained under each action and the PDF of Beta(64, 438) as functions of the value of the conversion rate 𝑟.
The utility obtained under each action and the PDF of Beta(64, 438) as functions of the value of the conversion rate 𝑟.
The distribution of utility values of launching, induced by the samples of 𝑟. We compute the average of the distribution and compare it against the utility of not launching.
The distribution of utility values of launching, induced by the samples of 𝑟. We compute the average of the distribution and compare it against the utility of not launching.
Comparison between two alternative settings of the decision problem where each conversion is valued differently. Regardless of the setup, Bayesian decision theory may be applied to determine the optimal action.
Comparison between two alternative settings of the decision problem where each conversion is valued differently. Regardless of the setup, Bayesian decision theory may be applied to determine the optimal action.
The search tree for the one-step decision-making problem, where each action’s net utility accounts for the cost of taking that action if there is one.
The search tree for the one-step decision-making problem, where each action’s net utility accounts for the cost of taking that action if there is one.
The search tree for a two-step decision-making problem, where after implementing a policy, we have the option to implement the remaining policy. We also have the option to terminate at any time.
The search tree for a two-step decision-making problem, where after implementing a policy, we have the option to implement the remaining policy. We also have the option to terminate at any time.
A branch in the two-layer search tree, where the utility values at leaf nodes depend on which policies have been implemented, their effects, and their implementation costs.
A branch in the two-layer search tree, where the utility values at leaf nodes depend on which policies have been implemented, their effects, and their implementation costs.
Propagation of utility from the leaf nodes to a sub-action node, and from sub-action nodes to an intermediate state node. As sub-actions have the same expected utility, the utility of either one may be used to determine the expected utility of the previous layer’s node.
Propagation of utility from the leaf nodes to a sub-action node, and from sub-action nodes to an intermediate state node. As sub-actions have the same expected utility, the utility of either one may be used to determine the expected utility of the previous layer’s node.
Another example of propagating utility from leaf nodes to a sub-action, and from sub-action nodes to an intermediate state node. The sub-action with the higher expected utility is chosen to have its expected utility propagated to its parent node.
Another example of propagating utility from leaf nodes to a sub-action, and from sub-action nodes to an intermediate state node. The sub-action with the higher expected utility is chosen to have its expected utility propagated to its parent node.
Propagating the adaptive expected utilities from intermediate state nodes to the initial action node. The final number represents the expected utility of making adaptive decisions after policy A is implemented in the first stage.
Propagating the adaptive expected utilities from intermediate state nodes to the initial action node. The final number represents the expected utility of making adaptive decisions after policy A is implemented in the first stage.
Propagating utility from leaf nodes to a sub-action, and from sub-action nodes to an intermediate state node, given that policy B is implemented first, and we receive the maximum payoff. Termination is chosen as the optimal sub-action given the large payoff from the first step.
Propagating utility from leaf nodes to a sub-action, and from sub-action nodes to an intermediate state node, given that policy B is implemented first, and we receive the maximum payoff. Termination is chosen as the optimal sub-action given the large payoff from the first step.
Propagating utility from leaf nodes to a sub-action, and from sub-action nodes to an intermediate state node, given that policy B is implemented first, and we receive zero payoff. Policy A should be examined next, which would help us avoid the negative terminal utility.
Propagating utility from leaf nodes to a sub-action, and from sub-action nodes to an intermediate state node, given that policy B is implemented first, and we receive zero payoff. Policy A should be examined next, which would help us avoid the negative terminal utility.
The upper confidence bound (UCB) heuristic with β = 2 chooses policy B as its action, agreeing with Bayesian decision theory’s decision.
The upper confidence bound (UCB) heuristic with β = 2 chooses policy B as its action, agreeing with Bayesian decision theory’s decision.

Summary

  • Bayesian decision theory extends Bayesian inference from what to believe to what to do.
  • A utility function quantifies how desirable different outcomes are, allowing us to compare decisions under uncertainty.
  • The optimal decision is the one that maximizes expected utility, which averages outcomes weighted by their probabilities.
  • Discrete decision problems can be generalized to continuous ones by defining utility as a function of the unknown outcome.
  • When expected utilities cannot be computed analytically, Monte Carlo sampling provides a simple and general approximation.
  • In sequential settings, decisions must account for future actions and outcomes, not just immediate utility.
  • The optimal strategy in a multi-step problem may differ from the optimal one-step decision due to the ability to adapt over time.
  • The exploitation–exploration tradeoff arises when actions affect both immediate utility and future gains.
  • Practical methods like upper confidence bound (UCB), Thompson sampling, and Monte Carlo tree search (MCTS) approximate optimal decision-making under uncertainty.

FAQ

What is Bayesian decision theory?Bayesian decision theory is a framework for making decisions under uncertainty. It says we should choose the action with the highest expected utility, combining our beliefs about uncertain outcomes with our preferences over those outcomes.
What is utility in Bayesian decision theory?Utility is a number that quantifies how desirable an outcome is. Higher utility means a better outcome, and lower utility means a worse outcome. It helps us compare different possible results of an action.
How is cost different from utility?Cost measures how undesirable an outcome is, while utility measures how desirable it is. They are closely related and can often be treated as negatives of each other.
What does expected utility mean?Expected utility is the average utility of an action across all possible outcomes, weighted by the probability of each outcome. It tells us how good an action is on average under uncertainty.
How do you decide between launching and not launching a new website design?You compute the expected utility of each option using the probabilities of the possible conversion-rate outcomes. In the chapter’s example, launching has a higher expected utility than not launching, so Bayesian decision theory recommends launching.
How do utility tables and search trees help with decision making?Utility tables list the utility of each action under each possible outcome, while search trees show the same problem as branches of actions and scenarios. Both representations help visualize and compute expected utility.
How do you handle utilities when outcomes are continuous rather than discrete?Instead of a table with a few outcomes, you use a utility function defined over every possible value of the unknown variable. Then you compute expected utility by integrating the utility function against the probability density of the variable.
Why is Monte Carlo used to estimate expected utility?Expected utility integrals can be hard to compute exactly, especially with complex models. Monte Carlo approximates them by sampling from the uncertainty distribution, computing utility for each sample, and averaging the results.
What is the difference between one-step and sequential decision making?In one-step decision making, you choose once and stop. In sequential decision making, you can act, observe results, update beliefs, and act again. Because of this, the optimal first action may change when later actions are allowed.
What are exploitation and exploration in decision making?Exploitation means choosing the action with the best immediate expected payoff. Exploration means choosing an action that may be worse now but could improve future decisions. Bayesian decision theory balances both by maximizing long-term expected utility.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking Bayes Grokking Bayes ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking Bayes Grokking Bayes ebook for free