A utility experiment
Here's a simple experiment I conducted on two of my daughers to illustrate some basics of consumer theory.
I provided
Subject A (Katie, left in photo) with two half-gallon containers of Edy's
Double Chocolate Fudge ice cream (her favorite) and instructed her to eat
all she wants while indicating the extra enjoyment or "utility" she
gets from each additional spoonful using an arbitrary 0-to-10 satisfaction
scale. To make this strictly scientific, I instructed Control
Subject B (Sarah, right in photo) to sit next to Subject A and provide
simultaneous 0-to-10 enjoyment ratings while not eating ice cream
(she gets all she wants immediately
after the experiment.).
If Subject B gives zero ratings while not eating ice cream, then we can
attribute Subject A's positive ratings to the fact that she is eating
ice cream.
Subject A provided the following ratings for each successive spoonful
of ice cream:
| spoonful | enjoyment | spoonful | enjoyment | spoonful | enjoyment |
| 1 | +10 | 13 | +9 | 25 | +5 |
| 2 | +10 | 14 | +9 | 26 | +5 |
| 3 | +10 | 15 | +9 | 27 | +4 |
| 4 | +10 | 16 | +8 | 28 | +4 |
| 5 | +10 | 17 | +8 | 29 | +3 |
| 6 | +10 | 18 | +8 | 30 | +1 |
| 7 | +10 | 19 | +7 | 31 | 0 |
| 8 | +10 | 20 | +7 | 32 | -1 |
| 9 | +10 | 21 | +7 | 33 | -2 |
| 0 | +10 | 22 | +7 | 34 | -3 |
| 11 | +10 | 23 | +6 | 35 | -4 |
| 12 | +10 | 24 | +6 |



Subject A gave her first 12 spoonfuls of ice cream ratings of 10. Ratings for the next 18 spoonfuls declined gradually, then more rapidly. Her 31st spoonful elicited a rating of zero, which suggests that she had eaten all the ice cream she really wanted, and her overall satisfaction or utility was at a maximum. I encouraged her to try a few more spoonfuls for the sake of science, and let her use negative numbers to indicate how much she didn't like eating the extra spoonfuls:



If we graph Subject A's extra utility ratings against her ice cream consumption, we obtain a marginal utility schedule (upper graph). If we calculate Subject A's cumulative utility from ice cream (10+10=20 for 2 spoonfuls; 10+10+10=30 for 3 spoonfuls, etc.) we obtain a total utility schedule (lower graph).

Utility with two goods
Utility depends on many different things that you consume or experience.
Suppose we expand our utility model to account for two different goods such as widgets and Spam. If we graph some person's utility against both widgets and Spam, we would get a 3-dimensional surface like a section of a hill:

It's easier to draw this utility surface as if we were looking straight down at it. This view also lets us see the contours of the hill (shown as numbered black curves).

Budget lines
What we are really interested in is how this person will spend his own money to buy Spam and widgets. To determine this, we need to know his budget (how much money he has to spend) and the prices of Spam and widgets. Suppose his budget is $12, the price of Spam is $3 each, and the price of widgets is $1.50 each. If he spent all his money on Spam, he could buy 4 Spams (= $12 divided by $3 per Spam). If he spent all his money on widgets, he could afford 8 widgets (= $12 divided by $1.50 per widget). Or he could buy some just-affordable combination of Spam and widgets, such as 1 Spam and 6 widgets, or 2 Spams and 4 widgets, or 3 Spams and 2 widgets. We can trace out a budget line showing all the affordable combinations of Spam and widgets for a given budget and set of prices (shown as the inner green line on the graph):

What if the price of widgets falls to $1 while the budget and price of Spam remain the same? Now he has a whole new set of just-affordable combinations: 12 widgets plue 0 Spams, 9 widgets plus 1 Spam, 6 widgets plus 2 Spams, 3 widgets plus 3 Spams, or 0 widgets plus 4 Spams. This price reduction shifts the budget line outward (the outer green line).
Now which combination of Spam and widgets will this utility-maximizing consumer buy? The graph says he will buy 6 widgets and 2 Spams for a new utility level of 60. No other affordable combination yields as high a utility level.
(You can imagine the budget line as a straight fence running diagonally over the shoulder of the utility hill. The consumer climbs to the highest point on the hill inside the fence.)
Demand
To recap, this consumer's budget is fixed at $12, and the price of Spam is held constant at $3, while the price of widgets varies. If widgets are $1 each, he buys 6 widgets to maximize his utility. If widgets are $1.50 each, he buys 4 widgets.
This is the information we're really after. First, this analysis lets us predict how many widgets the consumer will buy at various prices for widgets. By shifting the budget line to reflect various prices of widgets, we can trace out a complete demand schedule for widgets. This demand schedule includes the two points (6,$1.50) and (4,$1.00) we have already identified.

Second, this analysis shows that the demand for a good doesn't just depend on the price of that good. It also depends on the consumer's budget, and the prices of other goods too!
A final comment on money and happiness
Happiness (utility) itself is hard to measure objectively, and very hard to compare across people.
You have probably heard the old cliche that "money can't buy happiness." Well, that's not entirely true. Money buys the things that help satisfy your needs and wants. There is pretty good evidence that rich people are somewhat happier on average than poor peope: they live longer, are less likely to commit suicide, etc. But human wants do appear to be insatiable. There is always something else to buy. No matter how much they have, people always seem to want more! (Buddhists will tell you that true peace and happiness only come when you finally free your mind from all wants. The Roman orator Seneca said: "If you would make a man happy, do not add to his possessions, but subtract from his desires.")
Terms to know: