Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 37 ยท Getting Started

Rational Choice and Utility

Learn how game theory turns preferences into utility numbers, what rational means, how expected utility handles risk, and why risk attitude changes choices.

Game theory needs numbers. To say that a player "prefers" one outcome to another and then reason about what that player will do, we have to give each outcome a score. That score is called utility, and the assumption that players pick the action that leads to the highest utility is called rationality. This lesson explains both ideas, shows where they can mislead you, and gives you the expected-utility tool you need when outcomes are uncertain.

You do not need advanced math. You only need to be comfortable with averages. If you already read What Is Game Theory?, you know that a payoff is a number attached to an outcome. Here we ask where such numbers come from.

Preferences come first

Start with a person and a set of outcomes, say coffee (C), tea (T) and juice (J). The person can compare any two outcomes and say which is better, or that both are equally good. Written down, those comparisons are the person's preferences.

For preferences to be usable, we assume two sensible properties:

  • Completeness. Any two outcomes can be compared. You are never stuck saying "I cannot say."
  • Transitivity. If you prefer C to T and T to J, then you prefer C to J. Without this, you could be turned into a "money pump": someone sells you T for J plus a coin, then C for T plus a coin, then J for C plus a coin, and you end up where you started, poorer.

When both hold, you can always rank the outcomes from best to worst, and we can assign numbers that respect the ranking. Any such assignment is a utility function u. If you prefer C to T, then u(C) > u(T).

Note: Utility is not money and not happiness measured by a machine. It is a bookkeeping device that records the ranking of outcomes (and, later, how the person feels about risk). Two players with the same utility number do not necessarily feel the same.

Ordinal and cardinal utility

If utility only records ranking, the actual numbers do not matter. The utilities (3, 2, 1) and (100, 5, 0) both say "C beats T beats J." This is ordinal utility, and it is enough for many game concepts, such as dominance and pure Nash equilibrium, because those only compare payoffs.

But when risk enters, the size of the gaps matters. Choosing between "a sure tea" and "a coin flip between coffee and juice" depends on how much better coffee is than tea, compared with how much worse juice is. For that you need cardinal utility, where the numbers carry meaning. The classic framework, due to von Neumann and Morgenstern, says that if a person's choices among lotteries obey a few consistency axioms, there is a utility function such that the person picks the lottery with the highest expected utility.

Expected utility

A lottery is a list of outcomes with probabilities that add up to 1. Its expected utility is the probability-weighted average of the utilities:

EU = p1 * u(x1) + p2 * u(x2) + ...

Python Expected utility of a lottery

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Here the coin flip is worth 5 and the sure tea is worth 6, so this person takes the sure tea. If the person valued coffee at 14, the coin flip would be worth 7 and win. The same ranking of the three drinks, but a different gap, gives a different decision. That is why cardinal utility is needed for risk.

Money and risk attitudes

For money, people usually prefer more to less, but each extra dollar adds less happiness than the one before. A common model is the square root, u(x) = sqrt(x). This is a concave function, and it makes the person risk averse: they prefer a sure amount to a gamble with the same average.

  • Risk averse: utility curves down (concave). Prefers the sure 50 to a 50-50 gamble on 0 or 100.
  • Risk neutral: utility is a straight line, u(x) = x. Cares only about the average.
  • Risk loving: utility curves up (convex). Enjoys the gamble.

The certainty equivalent of a lottery is the sure amount that gives the same utility as the lottery. For a risk averse person it is below the lottery's average, and the gap is the price they would pay to avoid risk.

Python Three attitudes to risk

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The risk averse player would accept as little as 25 for sure instead of the gamble. The risk neutral player values it at exactly 50. The risk loving player demands 70.71 or more to give it up.

Rationality, carefully defined

In game theory, a player is rational if, given their beliefs about what others will do, they choose the action with the highest expected utility. Two points are often misunderstood.

  1. Rational does not mean selfish or greedy. A player's utility can include other people's welfare, fairness or a sense of duty. If a player is happier when a friend wins, that goes into the utility. What matters is that the payoffs in the game already include everything the player cares about.
  2. Rational does not mean omniscient. A rational player can be wrong about the world or about the other players. Rationality only says the choice fits the beliefs.

Many results in this course also use a stronger idea, common knowledge of rationality: everyone is rational, everyone knows everyone is rational, everyone knows that everyone knows, and so on. It sounds heavy, but it is what lets us reason "he will not play that, because it is a bad move, so I should..."

Warning: Real people often violate these assumptions. They overweight small probabilities, dislike losses more than they like equal gains, and sometimes care about fairness more than money. Behavioral game theory studies these departures. Standard theory is the baseline against which we measure them.

Why monotonic changes are safe for ordinal results

Because pure strategy concepts only compare payoffs, replacing every payoff by a strictly increasing function of it, for example doubling it or taking the logarithm, does not change which action is better. It can change the answer once probabilities are involved. The next experiment shows both facts: a ranking that does not change, and an expected-utility choice that does.

Python Rankings survive, gambles do not

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

With linear utility the gamble (average 5) beats the sure 4. With square root utility the gamble is worth 2 and the sure 4 is worth 2 as well, so the person is exactly indifferent and the tie is not broken by the gamble. The ranking of sure amounts never changed; only the treatment of risk did.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which property prevents a 'money pump' in a person's preferences?

    If preferences are not transitive (A over B, B over C, C over A), a trader can sell you a cycle of trades that leaves you worse off each time. Transitivity rules this out.
  2. 2. A person with utility u(x) = sqrt(x) compares a sure 36 with a 50-50 gamble on 0 or 100. Which do they choose?

    The gamble's expected utility is 0.50 + 0.510 = 5, while the sure amount gives sqrt(36) = 6. A risk averse person prefers the sure amount even though the gamble has the higher average.
  3. 3. Which statement about rationality in game theory is correct?

    Rationality links choices to beliefs and utility. The utility may include altruism, and the beliefs may be wrong.
  4. 4. For which concept do the exact payoff numbers (not just the ranking) matter?

    Expected utility averages the numbers, so the gaps between them matter. Pure comparisons only need the ordering.

Summary

  • Preferences that are complete and transitive can be represented by a utility function.
  • Ordinal utility records only the ranking; cardinal utility also carries the size of gaps and is needed for risk.
  • A lottery is valued by its expected utility, the probability-weighted average of the utilities.
  • Concave utility means risk aversion, linear means risk neutral, convex means risk loving.
  • A rational player maximizes expected utility given beliefs; this does not mean selfish or all-knowing.

Next: Payoff Matrices in NumPy