Imagine for a moment you’re a farmer. You have 500 acres of land which you can plant a choice of corn, wheat, or sugar beets. You also raise cattle on your farm which are fed a mixture of corn and wheat- either grown or bought at the market. You can sell the corn and wheat at the market for $170 / ton and $150 / ton or buy it for a 40% markup. Sugar beets have a quota, so normally they are sold at $36 / ton for less than the quota but sell for $10 / ton for more than the quota. This year the quota is 6000 tons. Yields are 2.5 tons / acre for wheat, 3 tons / acre for corn, and 10 tons / acre for sugar beets. Planting costs are $150 / acre for wheat, $130 / acre for corn, and $260 / acre for sugar beets. How do you decide how much of your land to allocate to corn, wheat, and sugar beets then?
Without uncertainty, this problem is called a “linear program”, a standard optimization problem where you choose to maximize profits given a set of constraints, leading to an optimal solution.
However, you are a farmer, not a weatherman. And the yields for the 3 crops highly depend on the state of the weather, which you do not control and need to decide which crops to plant in the spring and to then harvest in the fall.
Say there are three potential weather outcomes each with a 1/3 chance of occurring- great weather, average weather, and bad weather. In the great weather scenario you get +20% yield, average weather gives the expected yield, and the bad weather scenario leads to -20% yield.
Now, how does that change the decision? You might be saying to yourself, gee, I have no idea. But it probably depends on the potential gain from times when there is great weather and the potential losses from when there is bad weather.
Well you’d be right! And it is unreasonable to calculate this by hand, even for a simple stochastic optimization problem such as this. Instead we use a sophisticated optimization solver. The linear programming problem has turned into a stochastic optimization problem with this uncertainty. You’re optimizing under the given uncertainty. And it turns out you have a different optimal allocation! The profit under the stochastic optimization is $108,390, while the mean profit under the 3 scenarios if you knew the scenario ahead of time is $115,406. That is about ~$7000 worth of value in knowing what the weather will be!
It is unreasonable but possible to calculate the optimal allocation by hand, and if you wanted to you would start by assuming that you have zero acres of land. Then for your first acre, you would calculate which benefit would be highest for a given scenario and then choose the crop for that acre.
For the example above, say you choose to plant wheat. Then you have a a 1/3 chance of either producing 2, 2.5, or 3 tons, against the requirement that you must have 200 tons to feed your cows. Otherwise you buy the wheat at $238/ton and the corn at $210/acre. Your net profit from only planting one acre of wheat then would be
W: 1/3*(2-200)*238+1/3(2.5-200)*238+1/3*(3-200)*238 - 210*240 - 150 = $-97,555
( -150 $ to plant the wheat )
Similarly for corn and sugar beets:
C: 1/3*(2.5-240)*210+1/3(3-240)*210+1/3*(3.6-240)*210 - 238*200 - 230 = $-97,593
SB: 1/3*36*20+1/3*26*24+1/3*36*16-238*200-210*240-260 = $-97,540.
So for the first acre you choose to plant sugar beets! Then this goes until there is an expected value where you no longer can sell at $36 but rather $10, and it pushes you to choose to plant wheat, and then corn. You keep repeating the process until you “fill up” your acreage, against the constraint that you have 500 acres.
Stochastic optimization is powerful. It allows you to make an optimal decision in the face of an uncertainty, which may be different than the decision you make under no uncertainty.
Why this is important? Because I speculate that we do something similar with our decisions each day. I might always choose to bring an umbrella on a 50% chance of rain day, or never bring it, or bring it 50% of the time. And this could be a different decision than if I knew it was 100% chance of rain for that day.
But now, instead of umbrellas, take a similar exercise where you choose to spend your budget. Say instead of acres you have wealth w. At the first unit of wealth, w=1, speaking for myself I would likely either spend it on a dollar of food or a dollar of energy (say, a bus ticket to the bank to get a loan!)
Here the goods we are most inelastic for are likely to be the ones we would choose to spend that first dollar on. Then, after a certain level of utility derived from food and energy we choose to spend on other things like entertainment, schooling, etc.
This is important because if there is uncertainty in energy prices, this could affect our optimization. Overall we are worse for facing uncertainty in energy prices, and we optimize our time unit of happiness over this uncertainty. Take for example the choice of buying a car. When gas prices are low people choose to buy pickup trucks over sedans.
Earlier this week I listened to a very interesting podcast by David Robert’s Volts:
Where J. Doyne Farmer is interviewed about his paper regarding learning curves and energy transition. I highly recommend checking it out!
One key point from the podcast was that certain nonrenewable energy sources do not follow Wright’s law, which says that the unit cost of a good decreases according to a power function of the amount of good that is produced. This makes sense, that as we make more of something we get better at doing it. Think about the first time you baked a cake, or recorded a TikTok or really anything- you get better with practice.
Graphically, this shows up in an “S-curve” where over time repeating a task is difficult at first but we become better at doing it rapidly and then master it.
In the podcast, Farmer takes the example of nuclear energy and things that come out of the ground, like minerals and oil and gas, as energy sources that do not follow Wright’s law. Whereas we are already seeing something of the sort of with solar PV, wind, batteries, and green hydrogen.
They go on to show that a rapid energy transition would be the most profitable for society whereas a slow or average transition would not be as profitable since you are delaying the gains from Wright’s law.
Let me say that again. There are no costs to the energy transition. There is the opposite. There are costs to not undergoing a transition. Currently renewable sources like PV and wind are cheaper than nonrenewable sources. And by producing more, we make them even cheaper! Hence the quicker the transition, the more profits we make!
The reason why some energy sources follow Wright’s law but others do not is a mystery. Farmer suggests in the podcast it is likely because they are not commodities. So one nuclear plant is generally very different from another, as well as one oil well from another. I would like to add that there is likely an uncertainty angle here. That when searching for a new well it is uncertain the value of it, and this leads to either gains or losses which drives the cyclical nature of oil prices.
It follows that if these oil price cycles are driven by this uncertainty, (or other political or macroeconomic uncertainty) that if there is a rapid transition to clean energy (which follow Wright’s law, get cheaper when doing so, and do not see uncertainty in value) then likely the price of the energy we consume won’t be uncertain either. Think about a world in which we don’t care about gas prices because we drive electric and the cost is constant. We may be forced to use another metric to influence how we vote!
In this world our stochastic program turns into a linear program!
This is advantageous since we can better prepare and make judgements about our spending, and focus more on doing what each of us does best rather than optimizing over a changing state (see last week’s post on state variables!)
Without the volatility in energy prices it might also lead to dampening of business cycles, which have real impacts on peoples lives. A world without recessions might not be a good one for economists, but a wise man once told me “if you aren’t automating your job you aren’t doing it right.”