Too many parasols, too few staff
- Lesson 1
- 25 min
- Module 1: Forecasts serve decisions
Where we are
In the machine learning course, we predicted a number for each ticket, and each row stood alone. Larkfield now has a different question: how many parasols to order, and how many agents to put on next week's roster. In this lesson, we look at one summer where both forecasts went wrong, and at what each mistake cost.
Lesson 1 of 27 · Forecasting and Time Series: Predict What Comes NextToo many parasols, too few staff
1. Forecasts serve decisions
2. Read a time series
3. Baselines and honest testing
4. Statistical forecasters
5. Machine learning forecasters
6. Hard series and many series
7. Uncertainty and the decision
8. Run a forecast in production
What you will be able to do
See why a forecast is judged by the decision it feeds. A number about the future does nothing on its own: it helps only when someone acts on it, and every miss then has a price.
Before you startWhat to know and to have ready
What you need to know
- That a prediction serves a decision, and that the two kinds of mistake can cost different amounts, from Translate a need in Machine Learning: From Problem to Reliable Model.
- How to read a line chart. Nothing else: this lesson has no code.
What you need on your computer
Nothing. Keep a pen and paper ready for the practice.
Cooking for a party
Section titled “Cooking for a party”You cook dinner for a party on Saturday. You do not know exactly how many guests will come. About twenty, perhaps. So you guess, and you buy the food for your guess.
If you cook too much, you throw some food away. You lose the money that you paid for it. If you cook too little, some guests go hungry. You lose something different: a good evening, and perhaps a friend’s good opinion. Most cooks think that the second mistake is worse. So they cook a little more than their best guess.
You did not want a perfect number of guests. You wanted to decide how much to cook. The guess was only a step toward that decision. And the two ways to be wrong did not cost the same. This lesson is about that idea, at the scale of a shop.
One summer at Larkfield
Section titled “One summer at Larkfield”Larkfield is the online shop for home and garden products that you know from the machine learning course. Its data in this course is synthetic: we made it, and it has no real people or products. Two people make a decision from a forecast every week. Kenji, the stock planner, decides how many units of each product to order. Grace, the support lead, decides how many help-desk agents to put on the roster for each hour.
In 2025, both decisions went wrong in the same summer. The story of that summer is a situation we planted in the data, so that you can study it.
The parasols
Section titled “The parasols”The parasol is product P025, Parasol, 3 m, sand. It costs 79.99 dollars, and it sells mostly from April to September. In that season of 2024, Larkfield sold 2,200 parasols.
Before the 2025 season, Kenji ordered 2,000 parasols: a little less than the year before, to be careful. Then the summer was cold, about 4 °C below normal from June to August. From April to September 2025, Larkfield sold 1,585 parasols. At the end of the season, 415 parasols were left in the warehouse.
- Sold in 2024 (2,200 in all)
- Sold in 2025 (1,585 in all)
- Kenji's order for 2025 (2,000)
Text description of the chart
The chart has three lines over the season, from 1 April to 30 September. Each line adds up the parasols sold since 1 April. The 2024 line climbs slowly in April, fast from May to August, and ends at 2,200. The 2025 line climbs fast in May, then more slowly in the cold summer, with one short steep part at the start of July. It ends at 1,585. A flat dashed line at 2,000 is Kenji’s order for 2025. The gap between the end of the 2025 line and the dashed line is the 415 parasols left over.
The parasols that are left over do not disappear. Larkfield sells them at the end of the season at a 60% discount. Larkfield bought each one for about 65% of its price and sells it for 40% of its price. So each left-over parasol loses about 25% of its price: 20.00 dollars. That is 415 × 20.00 = 8,299 dollars, for one product in one season.
The heat-wave week
Section titled “The heat-wave week”Inside the cold summer, there was one hot week, from Monday 30 June to Sunday 6 July 2025. People suddenly wanted parasols. Larkfield sold 147 parasols that week, against 50 the week before.
The coast region had too few parasols in its warehouse for this. From 3 to 6 July, the coast ran out. Customers there wanted 14 more parasols, and could not buy them. A lost sale costs Larkfield its margin: the part of the price that is profit, about 35% of the price, or 28.00 dollars here. That is 14 × 28.00 = 392 dollars. So, in the same summer, Larkfield had too many parasols in total and too few on the coast in one week.
The heat wave hit the help desk too. Customers asked about their deliveries, and the help desk got 3,762 tickets that week, against 2,309 the week before. Grace’s roster for each hour came from the same hour in the four weeks before. Those weeks were normal, so the roster did not grow.
In this course, one agent answers about 6 tickets an hour, and agents work from 07:00 to 21:59. With these numbers, the heat-wave week needed 611 agent hours. The roster had 422.
- Agent hours needed (tickets ÷ 6, each open hour)
- Agent hours on the roster
Text description of the chart
The chart shows 14 days, from Monday 23 June to Sunday 6 July 2025. The first line is the agent hours needed each day: tickets ÷ 6 for each open hour, rounded up, then added up. The dashed line is the roster. In the first week, the two lines are close. The need goes from 37 to 70 hours a day, and the roster from 49 to 75. On Monday 30 June, the need jumps to 78, and on Wednesday 2 July to 111. The roster stays between 49 and 69. The need stays above the roster until Sunday 6 July.
Here, “short” means that an hour needed more agents than it had. Hour by hour, the heat-wave week was 191 agent hours short. In 86 of its open hours, at least one agent was missing. The week before was short by only 16 agent hours, in 13 hours.
Omar, the product manager, asks the first question: “What did this cost us, and what did customers feel?” Customers felt the waits: a ticket that nobody answers in time waits about a day longer. Larkfield puts a price on that wait, below.
A forecast serves a decision
Section titled “A forecast serves a decision”Now we can name the idea of the party. A forecast is a statement about a number in the future. For example: how many parasols customers will want this season, or how many tickets arrive on Wednesday at 10:00. A forecast alone changes nothing. It becomes useful when somebody makes a decision from it: Kenji’s order, Grace’s roster.
When the future comes, the real number is different from the forecast. It almost always is. Then the decision turns out too big or too small, and the business pays for the difference. That payment is the cost of a miss. So we judge a forecast by one question: how much did the decisions made from it cost?
Text description of the diagram
The diagram is a chain of boxes: the forecast for the season, then Kenji’s order of 2,000, then what happened. Customers wanted 1,599 and bought 1,585. Two dashed arrows split from there. “Too many” is 415 parasols left over at 20.00 dollars each. “Too few” is 14 sales lost on the coast at 28.00 dollars each. Both lead to the cost of the misses: 8,299 and 392 dollars.
The “1,599” in the diagram needs a word. It is the real demand: the parasols that customers wanted, including the 14 that they could not buy. Larkfield’s data shows only the sales. We know the demand because we made the data. The next lesson explains why this difference matters.
Too high and too low do not cost the same
Section titled “Too high and too low do not cost the same”A forecast can miss in two directions, and each direction has its own price. Here are the four prices that this course uses. They are assumptions: reasonable numbers that we chose for Larkfield, not numbers from a real shop.
| Miss | Decision | What it costs | For a parasol (79.99 dollars) |
|---|---|---|---|
| Forecast too high | Too much stock | A left-over unit loses 25% of its price | 20.00 dollars |
| Forecast too low | Too little stock | A lost sale loses the margin, 35% of the price | 28.00 dollars |
| Forecast too high | Too many agents | An extra agent hour costs its wage | 28 dollars |
| Forecast too low | Too few agents | An hour one agent short: 6 tickets wait about a day longer, at 12 dollars each | 72 dollars |
Now a tiny example. Suppose Kenji forecasts 100 parasols for some weeks and orders 100. Look at two possible futures:
| Customers want | Units left over | Sales lost | Cost |
|---|---|---|---|
| 90 | 10 | 0 | 10 × 20.00 = 200 dollars |
| 110 | 0 | 10 | 10 × 28.00 = 280 dollars |
In both futures, the forecast missed by 10 parasols. The error is the same size, but the cost is not. A miss on the low side costs 40% more for a parasol. For the help desk, the gap is much larger: one agent hour short costs 72 dollars, and one extra agent hour costs 28. A short hour costs more than two and a half extra hours.
This has a consequence that surprises many people. The best decision is often not the forecast itself. If running short costs more, you order or staff a little above your best guess, as the cook does. How far above depends on the two prices. Later in this course, you compute that amount exactly.
What the summer cost
Section titled “What the summer cost”Priya, the data scientist who guides you through this course, puts the summer’s misses into one table for Omar. The help-desk line uses the assumed 72 dollars for each agent hour short.
| Miss | Size | Price of one | Cost |
|---|---|---|---|
| Parasols left over at the end of the season | 415 parasols | 20.00 dollars | 8,299 dollars |
| Parasol sales lost on the coast, 3 to 6 July | 14 parasols | 28.00 dollars | 392 dollars |
| Agent hours short in the heat-wave week | 191 agent hours | 72 dollars | 13,752 dollars |
| Agent hours short in the week before | 16 agent hours | 72 dollars | 1,152 dollars |
The two decisions failed in opposite directions. The parasol order was too high for the season. The roster was too low for one week.
Tomás, the AI engineer, has an answer at once: “We need a better model. A foundation model would have seen this summer coming.” A foundation model is a large model trained in advance on very many series. It can forecast a new series without more training. Priya does not say no. But she asks two questions first.
- When was each decision made? Kenji ordered before April, for six months ahead. No model knew in March that June would be cold. A shorter time between the order and the sale would help more than a better model. That is the subject of the next lesson.
- Was one number enough? Kenji had one number for the season, with no idea how far it could be wrong. A forecast can also say “probably 1,800, but between 1,400 and 2,300”. Then Kenji can choose how much risk to take, with the two prices in the table. You learn to make such ranges later in this course.
Tomás’s model may still help. In this course, you test it on the same data as every other method, and you judge it by the same costs.
When a forecast is worth the work
Section titled “When a forecast is worth the work”A forecast is worth building when three things are true:
- A decision depends on the number. The order quantity, the number of agents, the size of a server.
- The decision must be made before the real number is known. Stock needs time to arrive, and agents need their roster in advance.
- A miss costs money, in at least one direction.
If one of these is false, do not build a forecast. Suppose a supplier delivers in one hour: then Kenji can react to sales and needs no forecast. Suppose a supplier sells only in boxes of 500, and Kenji always needs one box: then a better forecast changes nothing.
A forecast also has costs of its own. Someone must check the data, run the forecast every week, watch its errors and fix it. A small forecast that people use every week is worth more than a perfect one that nobody trusts.
Practice: price the misses
Section titled “Practice: price the misses”Do this on paper. The prices are the assumptions of the course. The numbers of units are made up for the exercise.
Product P002, the black folding chair, costs 26.99 dollars. Kenji forecasts that customers will want 300 folding chairs in the next 14 days, and he orders 300.
- Compute the cost of one left-over chair: 25% of 26.99.
- Compute the cost of one lost sale: 35% of 26.99.
- Customers want 260 chairs. Write the units left over and the cost.
- Customers want 340 chairs instead. Write the sales lost and the cost.
- Say which miss costs more, and by how much.
Show the answers
- 0.25 × 26.99 = 6.75 dollars (6.7475, rounded to the cent).
- 0.35 × 26.99 = 9.45 dollars (9.4465, rounded to the cent).
- 40 chairs are left over: 40 × 6.75 = 270 dollars.
- 40 sales are lost: 40 × 9.45 = 378 dollars.
- The low miss costs 108 dollars more for the same 40 chairs. That is 40% more, as for the parasol: the ratio 35 / 25 does not depend on the price.
Your turn: the roster
Section titled “Your turn: the roster”Grace’s forecast for one Wednesday says that the help desk needs 60 agent hours. She puts 60 agent hours on the roster. Before you compute, predict: which costs more, 10 hours too many or 10 hours too few? Then compute both with the table above.
Show the answer
If the day needs only 50 agent hours, 10 agent hours are extra: 10 × 28 = 280 dollars. If the day needs 70, the roster is 10 agent hours short: 10 × 72 = 720 dollars. The short day costs more than twice as much. So Grace has a reason to plan a little above her forecast. Her reason is stronger than Kenji’s for the chairs, because 72 / 28 is a larger ratio than 35 / 25.
Common mistake
Judging a forecast by its error alone
Symptom: Tomás compares two simple forecasts for Kenji’s orders on the same 50 products. The first one is a moving average of the last 28 days. Its misses add up to 43.5% of the units sold. The second one repeats the same weekday of last week. Its misses add up to 51.3%. “The moving average is clearly better,” says Tomás. Priya prices the orders made from each one. On average for each 14-day order, the orders from the moving average cost 19,444 dollars. The orders from “same weekday last week” cost 16,739 dollars.
Cause: an error measure counts every unit of miss the same way. The costs do not. A forecast can miss less in total and still miss more often on the expensive side. It can also smooth away the peaks where the lost sales happen. These numbers are measured on Larkfield’s data with the course’s test, which you build in Module 3.
Fix: write the cost of each kind of miss before you compare forecasts. Then score every forecast twice: by its error, and by the cost of the decisions made from it. When the two disagree, the cost decides.
Consequence in AI work: a team that chooses by error alone can pick the forecast that loses more money. It can also spend weeks on a small error gain that changes no decision.
Knowledge check
Section titled “Knowledge check”Check your understanding
In your own words: why is a forecast judged by the decision it feeds, and not only by how close it is to the real number?
Show the answer
A forecast changes nothing on its own. Its value comes from the decision that someone makes with it, such as Kenji’s order or Grace’s roster. When the real number comes, the decision is too big or too small, and the business pays for the difference. The two directions usually have different prices. So two forecasts with the same error can lead to different costs. The forecast with the smaller error can even cost more: 19,444 dollars against 16,739 dollars in the failure case of this lesson.
Does your answer have the main points of ours?
Sign in and enroll in the course to save your answers. Every check counts toward the certificate.
Check your understanding
Predict and explain: a parasol forecast is 10 units too low in one week and 10 units too high in another week. Which week costs Larkfield more, and how much do the two weeks cost?
Show the answer
The week where the forecast is too low costs more. Ten lost sales cost the margin, 35% of 79.99 dollars each: 10 × 28.00 = 280 dollars. Ten left-over parasols cost 25% of the price each: 10 × 20.00 = 200 dollars. The size of the miss is the same, but a lost sale costs more than a left-over unit. These prices are assumptions of the course.
Does your answer have the main points of ours?
Sign in and enroll in the course to save your answers. Every check counts toward the certificate.
Check your understanding
Larkfield's summer of 2025 had too many parasols and too few agents. Name the two decisions, say in which direction each one missed, and give the cost of each miss.
Show the answer
- Kenji’s parasol order was too high for the season. He ordered 2,000, Larkfield sold 1,585, and 415 were left over: 415 × 20.00 = 8,299 dollars. The same order was too low on the coast in the heat-wave week: 14 sales lost, 392 dollars.
- Grace’s roster was too low in the heat-wave week. The week needed 611 agent hours and had 422 on the roster: 191 agent hours short, at the assumed 72 dollars each, 13,752 dollars.
Does your answer have the main points of ours?
Sign in and enroll in the course to save your answers. Every check counts toward the certificate.
Recap
- A forecast is a number about the future. It is useful only through the decision made from it, such as an order or a roster.
- Every miss has a price, and the two directions have different prices. In this course, a left-over unit costs 25% of its price, and a lost sale 35%. An extra agent hour costs 28 dollars, and an hour one agent short 72. These are assumptions.
- Larkfield’s summer of 2025 had both kinds of miss. 415 parasols were left over (8,299 dollars), and 14 sales were lost on the coast (392 dollars). The heat-wave week was 191 agent hours short (13,752 dollars at the assumed price).
- Judge a forecast by its error and by the cost of its decisions. The forecast with the smaller error can cost more.
- Build a forecast only when a decision depends on the number, must be made in advance, and a miss costs money.
You can now say what a forecast is for and what its misses cost. But “forecast the parasols” is still too vague to build: it does not say what to count, for which region, or how far ahead. Next, you write those choices down as a forecast frame for Kenji and for Grace.
Next: Frame the forecast