liveBook · Manning

Utility function

As explained in Timeless Algorithms, The Foundational Ideas

Utility is a numerical representation of the desirability or preference associated with an outcome.

A utility function assigns numerical values to outcomes according to their desirability to a decision maker. Utility captures preferences—not uncertainty—and need not be monetary; it can represent benefits, costs, risks, or discomfort. section 7.1 section 7.2.2

For an act, expected utility combines its possible outcomes with the probabilities of the states that produce them. Choose the act with the greatest expected utility. section 7.2.2

a*= arg⁡maxa[∑θ u(a, θ)p(θ | data)]

The equation weights each act–state utility by the posterior probability of that state, then selects the act with the largest sum. section 7.2.2

Treating after a diagnostic test

A physician compares treating and not treating across the possible states of disease present or absent. Utilities capture consequences such as cure, unnecessary cost, side effects, and harm from not treating disease; posterior probabilities alone do not determine the choice. section 7.1

Opportunity loss expresses the same decision in terms of satisfaction sacrificed: it is the utility of the best act for a state minus the utility of the chosen act. Minimizing expected opportunity loss is equivalent to maximizing expected utility. section 7.3.1

How Timeless Algorithms, The Foundational Ideas covers it

How deep it goes
Defines utility and connects it to expected utility and opportunity loss through equations and a diagnostic decision.
Examples
Uses a physician’s treat-or-not decision across disease-present and disease-absent states.
What it assumes
Assumes possible acts, states, and beliefs are specified, while allowing utility to represent nonmonetary consequences.
What you can do after
Evaluate acts by weighting outcome utilities with state probabilities and choosing the act with greatest expected utility.
How it connects
Connects utility to Bayesian posterior probabilities, expected utility, opportunity loss, and decision-making under uncertainty.

Also explained in

Compare how 3 books explain utility function →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Timeless Algorithms, The Foundational Ideas. The section links point to the parts of the book it draws on.