How many beers should I drink?
No, this is not a post about me emotionally processing the tariffs. Mostly.
I’m an economist, but what does economics have to do with beer or choosing a college or figuring out which parking lot to try first when you’re late to work? To abuse a Ghandi quote: “In reality, there are as many religions definitions of economics as there are individuals economists.” But my definition is this:
Economics is the study of decisions in the face of scarcity.
We want things. There are not unlimited things. So we need to figure out how the things get allocated. That’s what economics is about.
The tool for mathematically modeling individuals’ choices is constrained optimization; we want to make ourselves as well off as possible given our restrictions (money, time, etc.).
Let’s say that I’m at my local brewery, and there are two items I can purchase: beers and tacos. Each beer is $5 and each taco is $4 and I have $30 to spend. People value beers and tacos differently. I like beer but I really like tacos. Let’s say that the function that describes how much well-being I get from beers and tacos is:
The U stands for utility function, a function that tells you how much utility you get from different combinations of goods. The actual numbers produced by the utility function don’t matter, but their relative values do.
Why would you inflict natural logarithms on me at this point in my life?
Because the natural log function has diminishing marginal increases. If we were to graph the utility function along the beer axis, it would look like this:
As the number of beers goes up, my well-being goes up too, but it goes up by less and less with each beer. Economists like to use functions with this property for utility functions because that’s how we think actual people work. We always want more things (beers, tacos, clothes, cars, etc.), but the increase in utility that we get from each subsequent thing is smaller than the last one. And eventually, the increase is small enough that it’s not worth the cost of the next thing.
My utility at the brewery is constrained by my budget of $30. Since each beer is $5 and each taco is $4, my budget constraint in terms of number of beers (b) and number of tacos (t) is:
Let’s assume I spend all my money. My utility maximization problem is:
What I want to find is the value of b and the value of t that makes my utility function as large as possible without overspending the budget. There are many ways to solve a constrained optimization problem like this. My particular favorite is the Lagrangian Method, although I also enjoy the version where you just ask a computer. The Lagrangian Method consists of combining all of the elements of the optimization problem into one big function. Then you take the partial derivatives of this function, set them equal to zero, and solve the resulting system of equations. One reason I like using the Lagrangian (other than because algebra is fun) is because it allows me to see how many beers I should drink per taco consumed. (If you’d like to see me actually solve this algebraically, I’ll put it at the end of this article.) When I am making optimizing decisions, my optimal number of tacos (t*) in terms of optimal beers (b*) is
See below for how I got this. This means that each taco is worth about 2 beers to me. So when I am making my best choices, I should have about two tacos for every beer I drink.
If I actually solve the optimization problem, the optimal values of b and t are:
Let’s assume that my brewery doesn’t let me order fractional beers, so my optimal number of beers is 2 and my optimal number of tacos is 4. I don’t have the money to buy a 3rd beer. And I don’t want to stop at just the one beer; the next one would give me more utility and I can afford it. So 2 is the magic number.
But different people like different things.
Let’s think about my husband’s utility function at this brewery. He also likes beers and tacos, but he likes beers more than tacos.
He also has $30, so he has the same budget constraint. His maximization problem is:
His tacos-to-beers equation is:
So for every beer, he should have two thirds of a taco. Or, put another way
So for every taco, he should have 1.5 beers.
Given his budget, his optimal values for b and t are:
So I might see him get that third beer and think, “now you won’t be able to afford your next taco! A tragedy!” But it’s because he values beers and tacos differently than I do. A third taco will make me happier than a third beer, but that’s not so for him.
Be serious, I’m not solving a Lagrangian at the brewery
Yes, I know. Me, neither. Most of the time. Unless they have like three good IPAs and I’m having trouble choosing.
But it might be helpful to think about how many tacos or burgers or whatever else you might spend the money that would go to another beer is worth to you. If you have a rule of thumb like “two tacos per beer,” you’ll probably be in pretty good shape. Ask yourself, “when I am having a great time and am at my happiest, about how many tacos do I have per beer?”
If you set yourself a budget for your trip to the brewery, and you have a ratio of tacos to beers, you will be essentially solving your utility maximization problem (under some reasonable assumptions about the shape of your utility function).
Understanding two key things will make you a better decision-maker and a better drinking buddy:
You are trying to choose things to make yourself as happy as possible, given what you have to work with. This requires acknowledging trade-offs.
Everyone has different preferences, priorities, and resources. If you see someone make a decision that is different than yours, it’s not because they’re foolish or bad at tacos, it’s because they’re working with different objectives and costs.
Know someone who would like to read about beer and constrained optimization (and who wouldn’t)? Share this article with them!
Here is the actual algebra of my optimization problem for you sickos who want to see the whole thing
My Lagrangian function is
My first order conditions (the partial derivatives with respect to my choice variables set = 0) are:
If we solve those first two for lambda, we get
We can rearrange that to get the optimal beer and taco relationship
If we plug that back into the budget constraint, we get
So the optimal value for b is
Plugging that back into the optimal beer and taco equation, we get
Yay!