Lab 4 · Uber · Forecasting · Surge Pricing · Responsible AI

Build a Demand Forecasting Model
& Decide When to Trust the Algorithm

You will build the same forecasting system Uber uses to set prices and move drivers. Then you will stress-test it, watch it drive automated decisions, feel it break from the inside as a driver, and decide what that means for the people whose livelihoods depend on it.

Built collaboratively with Claude. Every chart, simulator, and game in this lab was built by your instructor working with Claude — describing what was needed, evaluating the output, and iterating until it was right. That is the same workflow you will use in the Colab steps. Pay attention to what it produced. That capability is available to you too.

Claude Google Colab Live Simulators Driver Game GitHub Pages
📈
Step 1
Explore the Data
🔭
Step 2
Build & Backtest
📅
Step 3
Friday Night Forecast
🔀
Step 4
Stress-Test It
⚡
Step 5
The Algorithm Decides
⚠️
Step 6
Break the Model
🎮
Step 7 — Game
Drive for Uber
🌐
Step 8
Publish to GitHub
1
Explore the Data
AI Factory stage: Data — see trend and seasonality in raw trip history

It's Thursday, October 16, 2025. You're a data analyst on Uber's Bellingham operations team and your manager just asked you to forecast Friday night demand near WWU campus — there's a Death Cab for Cutie, Sleater-Kinney, and ODESZA homecoming concert tomorrow night, Friday October 17, and operations needs to know how many drivers to deploy at 10pm when the show lets out. Tomorrow is the prediction. Today's job is data.

Here's the catch: you can't pull data on tomorrow's concert because tomorrow hasn't happened. What you can do is pull every Friday night near campus for the last two years and look hard at the closest things to a concert night in that history — homecoming weekends, welcome week in September, graduation Friday, the basketball playoffs in March. Those past high-demand Fridays are the only evidence you have for what tomorrow might look like. If your data doesn't contain anything that resembles a concert, your model has no business predicting one.

From that historical data you need three things:

1. Trend. Has Friday night demand been growing over time? Over the past two years, Friday night trips near campus have risen steadily from around 280 trips to around 380 per Friday night. That's Uber's market expanding — more drivers, more riders, more trips every month. Your model needs to know this so it doesn't predict tomorrow based on what Friday looked like two years ago.

2. Seasonality. How does Friday night demand vary by time of year? When WWU students are on campus (late September through mid-June), Friday nights are noticeably busier — more people going out, more rides needed. Summer Fridays are quieter with students gone. Late December drops sharply during finals and break. And New Year's Eve produces a massive spike every year. These cycles repeat on a schedule, which means a model trained on enough history can learn to anticipate them.

3. Past event nights. Hidden inside the two years of history are the high-demand Fridays — homecoming weekends, welcome week, graduation, basketball games. These are the only data points in your dataset that resemble what tomorrow might be. A model trained on the average Friday will underpredict an event Friday. Knowing where those event nights are in your data is how you spot whether the model has anything useful to say about October 17.

The chart below shows what that historical Friday night data looks like. Take a minute to read it before running the prompt — you will be generating this same chart in Colab.

Friday Night Uber Trips Near WWU Campus (Year 1: Oct 2023 – Oct 2024) · ● Event nights

For this step, you will ask Claude to simulate that historical Friday night dataset. Since you don't have direct access to the production trip database for this exercise, simulating a realistic stand-in is how you get something to look at. Here is exactly what you are pulling and why each piece matters for the October 17 forecast:

  • 2-year Friday night trip counts — 104 weeks of how many Uber trips were taken on Friday nights near WWU campus. This is the core signal the model will learn from.
  • Trend — the steady growth from ~280 to ~380 Friday night trips over two years. Without this, the model predicts tomorrow based on what Friday looked like two years ago and consistently undershoots.
  • School-year effect — WWU's academic calendar (late September through mid-June) makes Friday nights busier with students on campus. Summer Fridays are quieter. The model needs to know the difference.
  • NYE spike — New Year's Eve produces a massive demand spike every year. It's a one-night pattern the model needs to recognize so it doesn't confuse a normal December Friday with NYE.
  • Past event nights — about 4–5 high-demand Fridays per year (homecoming, welcome week, graduation, basketball playoffs) that ran roughly 1.6–1.8× a normal school-year Friday. These are the closest analogs to October 17 and the only event-night evidence your model will have.

Once you have the data in Colab, you will plot it so you can see these patterns yourself before handing it to a model. That is what a real analyst does — the chart is not decoration, it is how you catch problems in the data before they become problems in the forecast.

Prompt 1 — paste into Claude to generate and explore your dataset
It's Thursday, October 16, 2025. I'm a data analyst on Uber's Bellingham operations team and my manager just asked me to forecast Friday night demand near WWU campus — there's a Death Cab for Cutie, Sleater-Kinney, and ODESZA homecoming concert tomorrow night, Friday October 17, and we need to know how many drivers to deploy at 10pm when the show lets out. Tomorrow is the prediction. Today's job is data. Since I don't have direct access to the production trip database for this exercise, please write Python code for Google Colab that simulates a realistic stand-in dataset and explores it. Specifically: 1. Simulate two years of historical Friday night Uber trip data (104 consecutive Fridays) near WWU campus with patterns we'd actually expect to see in Bellingham: - A realistic upward trend (growing from ~280 Friday night trips to ~380 over 2 years as Uber's market expands locally) - A school-year effect: Fridays during WWU's academic calendar (late September through mid-June) are busier with students on campus — add roughly 55 more trips on school-year Fridays compared to summer Fridays - Summer Fridays (Jun–Aug) are the quiet period — students are gone, fewer people going out - Late December drops sharply during finals and break, but New Year's Eve spikes hard (add ~175 trips) - About 4–5 "event nights" per year mixed into the data — homecoming weekend, a welcome week Friday in September, graduation Friday, and 1–2 basketball playoff Fridays — where trips run roughly 1.6–1.8× a normal school-year Friday - Store as a pandas DataFrame called df with columns: week (date, starting Friday 2023-10-20 and ending Friday 2025-10-10 — exactly 104 consecutive Fridays), friday_night_trips (integer), and is_event_night (1 on event Fridays, 0 otherwise) 2. Plot the data as a clean line chart titled "Friday Night Uber Trips Near WWU — 2 Years of History" with the X axis labeled "Week" and Y axis labeled "Friday Night Trips". Mark the start of each summer with a vertical dashed line. Highlight every event night as a red dot and label each one with what it was (e.g. "Homecoming", "Basketball", "Graduation", "Welcome Wk") — those are the closest historical analogs to tomorrow's concert. 3. Print three things: - First and last 10 rows of the dataset - Summary stats: min, max, and average Friday night trip count, plus which week had the highest demand - A separate summary just for event nights: how many event Fridays are in the dataset, the average trips on event nights vs. normal school-year Fridays, and one printed sentence: "Tomorrow's concert (Friday Oct 17, 2025) is most similar to these N event nights in the dataset." Add a plain-English comment above each section explaining what it does and why it matters for the October 17 forecast I need to build next. Don't build the forecast model yet — my manager is waiting, but I need to see the data clearly before I can trust anything I build on top of it. Important: this code runs in Google Colab. Display all charts and output directly in the notebook — do not save any files to disk.
What you just did
You did exploratory data analysis — a fancy name for a simple idea: before you build anything, look at your data and see what's in it. You pulled two years of Friday night trip history, plotted it, and looked for patterns. Demand is growing over time (~280 to ~380 trips). School-year Fridays are busier than summer Fridays — students on campus means more nightlife. NYE spikes hard every year. And most importantly for tomorrow night, there are a handful of past event Fridays hidden in the data — homecoming, welcome week, basketball playoffs, graduation — that spiked well above the normal line. Those event nights are the only things in your two years of history that look anything like October 17. They're rare — roughly 4–5 per year, maybe 8–10 across the full dataset — which already tells you something important: a model trained on this data is going to be much better at predicting an ordinary Friday than a concert Friday. Real analysts notice that gap before they ever train a model.
Step 1 Reflection — answer two questions
Q1 — Find your analogs. Look at your chart. Identify the 1–2 historical Fridays that look most like tomorrow's concert night (Oct 17, 2025). What's their trip count compared to a normal school-year Friday? Based on those analogs alone — before any model — what's a reasonable rough range you'd expect tomorrow to fall in?

Q2 — What's missing. You now have around 8 event nights across two years of data. Is that enough for a model to learn the pattern of an event night? What problem are you setting yourself up for in Step 2 if you train a model on a dataset where event nights are this rare?
2
Backtest the Model
AI Factory stage: Model — prove the model works before trusting it with the future

You have the data. Before you use it to predict tomorrow's concert night, you need to answer a sharper question than "does this model work?" The real question is: does this model work on the kind of Friday I'm about to predict?

A model can have a great average MAE and still fall apart on event nights — because event nights are rare in the training data and a linear regression spreads its error budget across the common cases. So in this step you're going to do two backtests at once. First the standard one: train on weeks 1–78, predict weeks 79–104, compute MAE across the whole test window. Then a sharper one: pull out just the high-demand Fridays in your test window and check the MAE on those. The gap between the two numbers tells you whether your model is ready for October 17 — or only ready for an ordinary Friday.

This is called backtesting. You take your two years of historical Friday night data and split it in two. You give the model the first 18 months — weeks 1 through 78 — and let it learn the trend, the seasonal patterns, and the school-year effect. Then you hide the last 6 months — weeks 79 through 104 — and ask the model to predict them, as if those weeks hadn't happened yet. You already know what actually happened in those 26 weeks, so you can compare the model's predictions directly against reality.

Why cut off at week 78?
The 78/26 split gives the model 18 months to learn from and 6 months to be tested on. That 6-month test window is long enough to include seasonal variation and at least 1–2 event nights — exactly the kind of Friday you're trying to predict tomorrow. If the model can't handle the event nights in the test window, you have your answer about October 17 before you ever run the forecast.

Your boss is still waiting for an answer about tomorrow night. You're not ready to give it yet — but this step is how you get there.

How the forecast actually works (and why we're keeping it simple)
Real Uber uses sophisticated models — gradient-boosted trees, neural networks, real-time GPS signals, weather feeds, event calendars. You can't read those models. You can't open them up and see why they predicted 910 trips instead of 400. For this lab, we use linear regression instead — the simplest forecasting model that actually works — because you can read it. The tradeoff: it's less accurate than what Uber really uses, but you can see every piece of the prediction and explain it to your boss in one sentence. That transparency is the point of this step.

Here's how it works. The model learns a recipe. It starts with a base number — think of it as "how many trips on a completely average Friday with nothing special going on." Then it looks at what kind of Friday this is and adjusts up or down:

Start with the base: ~321 trips (a generic Friday with nothing special going on)
How far into the future? Add ~1 trip per week (demand grows slowly over time)
Is it summer? If yes, subtract ~45 trips (students gone, quieter)
Is it New Year's Eve? If yes, add ~137 trips (big spike)
Are students on campus? If yes, add ~45 trips (school year = busier nightlife)
= Predicted trips for that Friday

That's the entire model. Notice how the recipe makes intuitive sense for Bellingham: students on campus means more Friday night activity (+33 trips), summer means students are gone (−33 trips), NYE is a big spike (+150), and demand grows a little each week as Uber's market expands. Your exact numbers may differ slightly from your classmates' because the simulated data has some randomness, but the pattern should be similar.

Most importantly, look at what's not on the list. There's no step that says "Is it a concert night?" The model can only adjust for questions it has. October 17 is a concert night, but the model doesn't have a question for that — so it can't adjust.

In the prompt below, you ask Claude to take the same dataset you built in Step 1 and split it. Weeks 1–78 is your training window — about 18 months ending around April 2025. The model learns from that. Weeks 79–104 is your test window — about 6 months ending Friday, October 10, 2025 (the Friday before the concert). The model never sees this period during training. Once it has learned from weeks 1–78, you ask it to predict weeks 79–104 as if they haven't happened yet. But first — before any MAE or backtest chart — the prompt asks Claude to print the model's actual equation and walk through a worked example. You need to see how the forecast works before you can judge whether to trust it. Then you compute two MAE numbers: one for the whole test window, and one for just the high-demand Fridays in that window. Those two numbers, side by side, are how you decide whether to trust this model with October 17.

Prompt 2 — paste into Claude to build and backtest your model
The concert is tomorrow night — Friday, October 17, 2025 — and my manager is waiting on a forecast. Before I trust this model with that recommendation, I need to backtest it: train it on the older part of my historical data, hide the most recent months, and see if it can predict them accurately. And because tomorrow is a concert, I specifically need to know whether the model handles event-like nights, not just average ones. I have the historical Friday night dataset from Step 1 — a DataFrame called df with columns week (datetime), friday_night_trips (integer), and is_event_night (0/1), 104 weeks total. Please add Python code that does the following: Step A — Feature engineering: Add these columns to df: - week_num: integer index of each week (1 through 104) - is_summer: 1 if the week falls in June/July/August, 0 otherwise - is_nye: 1 if the week contains December 31st, 0 otherwise - is_school_year: 1 if the week falls in WWU's academic calendar (late September through mid-June), 0 otherwise Add a plain-English comment explaining why each feature matters for predicting Friday night demand near campus. Note: do NOT use is_event_night as a model feature — the model should not get to cheat by looking at whether a week was an event night. We want to see how well a model trained only on calendar features handles event-like demand. Step B — Train/test split: - Weeks 1–78 are the training set (the 18 months the model learns from) - Weeks 79–104 are the test set (6 months the model never sees during training — ending Friday, October 10, 2025, the Friday before the concert) - Print a plain-English explanation of what this split means and why an analyst always does it before trusting a model with a real prediction. Step C — Show me how the model makes a prediction: After training the linear regression, print the model's recipe in plain English. Don't just print the math equation — explain it as a step-by-step recipe that a non-technical manager could follow: "Here is how the model predicts Friday night trips: 1. Start with the base: ___ trips (this is the starting point — a hypothetical Friday with nothing special about it) 2. Adjust for time: add ___ trips for each week that has passed (demand grows as Uber's market expands) 3. Is it summer? If yes, add ___ trips. If no, add nothing. 4. Is it New Year's Eve? If yes, add ___ trips. If no, add nothing. 5. Are students on campus (school year)? If yes, add ___ trips. If no, add nothing. 6. Add it all up = predicted trips for that Friday." After the recipe, print the actual mathematical equation too (predicted_trips = intercept + coef×week_num + ...) so students can see both formats. Then show a worked example: pick one school-year Friday from the training data around week 50. Walk through the recipe step by step with that week's actual values — show what gets added and what doesn't. Print the model's predicted trips next to the actual trips for that week so the student can see how close it was. Print one sentence at the end: "Notice there is no step that asks 'Is it a concert night?' The model can only adjust for questions it was trained to ask." Step D — Evaluate the overall MAE: - Train a linear regression model on the training set using the four calendar features (week_num, is_summer, is_nye, is_school_year) - Generate predictions for the test set (weeks 79–104) - Calculate the overall Mean Absolute Error (MAE) and print: "Overall MAE on the test window: the model was off by X trips per Friday on average." Step D2 — The concert-relevant MAE: - Within the test window, identify the high-demand Fridays — use is_event_night == 1 from the original data to flag them. (These are the historical event Fridays the model just tried to predict using only calendar features.) - Compute MAE on JUST those event Fridays in the test window. - Print both numbers side by side: "MAE on normal Fridays: Y trips. MAE on event Fridays: X trips." - If the event-Friday MAE is meaningfully larger than the normal-Friday MAE, print one sentence acknowledging that the model is more reliable on ordinary Fridays than on the kind of Friday I'm trying to predict tomorrow. - Print one final line: "Whether this error level is good enough to forecast October 17 is a judgment call the analyst has to make — not the model." Step E — Visualize the backtest: Plot the full 104 weeks showing: - Solid cyan line: actual Friday night trips (all 104 weeks) - Dashed orange line: model predictions for weeks 79–104 only - Shaded ±15% band around the predictions - Red dots on every event night (use is_event_night == 1) so I can see where the model's biggest misses cluster - Vertical line at week 78 labeled "Model trained on everything left of this line" - Title: "Friday Night Demand — Backtest Results (Concert is Week 105)" Add plain-English comments throughout. No ARIMA, no LSTM — linear regression only. I need something I can defend to my manager in plain English, not a black box. Important: this code runs in Google Colab. Display all charts and output directly in the notebook — do not save any files to disk.
What you are looking for in the output
Three things to pay attention to. First, the recipe: the model will print its step-by-step prediction process — "start with the base, adjust for time, is it summer, is it NYE, are students on campus, add it up." Read each step and the number it adds. The worked example shows the recipe in action on a real week — you'll see the model predict a number, and then see what actually happened that week, side by side. Second, the backtest chart: how closely the dashed orange line tracks the solid cyan line in weeks 79–104, and especially how it handles the red dots (event Fridays). Where the orange line lands far below a red dot, the model is underpredicting an event night — the recipe has no step for it. Third, the two MAE numbers: the overall MAE and the event-Friday MAE. The gap between them tells you whether your model is ready for October 17 or only ready for an ordinary Friday.

What is MAE? Mean Absolute Error is the average size of the model's mistakes. If MAE is 25, the model was off by about 25 trips on a typical Friday. Whether that's acceptable depends on which Friday: 25 trips on an ordinary night is fine, 25 trips on a concert night where you're staffing drivers is a much bigger problem.
What you just did
You built a model and checked whether it actually works — not just on average, but on the kind of Friday that matters for tomorrow.

First you did feature engineering — that just means giving the model useful yes/no questions it can learn from. Instead of handing it a raw date like "March 15, 2024" (which means nothing to a model), you translated it into questions a driver would actually care about: Is it summer? Are students on campus? Is it New Year's Eve? Those are the features. The model can't think — it can only count patterns in the answers to those questions.

Then you trained a linear regression — a model that looks at 78 weeks of answered questions and figures out a recipe: "start with 321 trips, add 1 per week for growth, add 45 if students are on campus, subtract 45 if it's summer, add 137 if it's NYE." Each number in the recipe is called a coefficient — it's just how much each answer adds to or subtracts from the prediction. Think of it like a tip calculator: the base fare is fixed, and each condition adjusts the total up or down.

Then you backtested it — you hid the last 26 weeks and asked the model to predict them blind. You checked the results two ways:

Check 1 — Overall accuracy (all 26 Fridays)
The model was off by about 21 trips on a typical Friday. So if it predicts 370 trips, reality is probably around 349–391. That's close enough to staff drivers correctly. On a normal Friday, this model works.
Check 2 — Event Friday accuracy (just the event nights)
The model was off by about 313 trips on event Fridays. For example, there was a graduation Friday in the test window — a past event night the model had to predict blind. The model predicted 349 trips for that night. The actual number that Friday was 662. The model was off by almost double because its recipe has no way to account for an event. If you trusted that same recipe for tomorrow's concert, you'd send about half the drivers you actually need. Riders would be standing outside the venue for 20+ minutes waiting for a car that isn't coming.

The overall average hid a big problem: the model works fine on normal Fridays but completely misses event nights. Why? Look at the recipe — there's no question that asks "Is it a concert night?" The model can only adjust for questions it has. No question, no adjustment, wrong answer.
Step 2 Reflection — answer both
Q1 — The two MAEs. Look at your two MAE numbers — the overall MAE and the event-Friday MAE. Which is bigger and by roughly how much? What does that gap tell you about how much you should trust this model for tomorrow's concert specifically?

Q2 — What this means for Step 3. Given what you just learned about how the model performs on event-like Fridays, would you send the raw model output to your boss tomorrow without any adjustment? Why or why not? (You're going to confront this exact question in Step 3.)
3
Make the Friday Night Forecast
The model works on normal Fridays — but tomorrow isn't a normal Friday

In Step 2, you tested the model and learned two things: it's solid on normal Fridays (off by about 21 trips), and it completely misses event nights (off by about 313 trips on the graduation Friday). Tomorrow's concert is the same kind of night. Now you're going to use the model for real — knowing where it breaks.

Backtest vs. forecast — what's different now?
In Step 2, you were testing — you already knew the right answers and were checking whether the model could find them. In Step 3, you are predicting — nobody knows the right answer yet. The concert hasn't happened. The number you produce will decide how many real drivers show up tomorrow night.

Your boss emails you:

From: Operations Manager — Thursday Oct 16, 9:14am
"Hey — is the forecast ready? Concert's tomorrow night. I need to know how many drivers to put on near campus at 10pm and whether we're activating surge. Let me know ASAP."

You reply: "Model's backtested and validated — running the October 17 forecast now, will have a number for you within the hour."

Notice what your boss is asking for: drivers, not trips. But to figure out how many drivers to deploy, you first need to know how many trips to expect — that's what the model predicts. Then you convert trips into drivers (if you expect 910 trips and each driver handles about 3 trips per hour, you need roughly 304 drivers). The trip forecast is the input. The driver recommendation is the output your boss acts on.

Here's what you're about to do. You'll run the model's recipe on October 17 and it will produce a number. But you already know that number will be too low — the graduation Friday in Step 2 proved the model can't handle events. So after seeing the raw prediction, you'll adjust it based on what your data says about past event nights. The model gives you the math. You add the judgment.

Here's what the model's recipe looks like when you plug in October 17:

The model's recipe for Friday, October 17, 2025
Start with the base: ~321 trips
Week 105 (demand has been growing): +~95 trips
Is it summer? No: +0
Is it NYE? No: +0
Are students on campus? Yes: +~45 trips
Raw prediction: ~455 trips
What's missing: There is no current data for "Is it a concert night?" — so the model treats October 17 like any other school-year Friday. It has no idea 7,500 people are about to pour out of the WWU pavilion at 10pm.
The analyst adjustment: Remember the event night summary from Step 1? Event Fridays had ~1.6–1.8× more trips than normal school-year Fridays. This concert is even bigger than those past events, so you'll multiply the raw prediction by 2.0×. → 455 × 2.0 = ~910 trips
Prompt 3 — paste into Claude to generate the concert night forecast
I just backtested my Friday-night forecasting model. The overall MAE was about 21 trips — fine for normal Fridays. But on event Fridays the error jumped to about 313 trips — the model predicted 349 for a graduation Friday that actually had 662 trips. The model works on normal Fridays but misses event nights because it has no feature for events. Now I need to use this model to forecast a real event — carefully, knowing where it breaks. Scenario: there is a Death Cab for Cutie, Sleater-Kinney, and ODESZA homecoming concert at WWU tomorrow night — Friday, October 17, 2025. The show ends at 10pm and the crowd will be looking for rides. My operations manager needs to know: how many drivers should we have online near campus at 10pm, and should we activate surge pricing? Please add Python code that does the following: Step A — Build the concert Friday feature row: Create a single-row DataFrame for October 17, 2025 with these values: - week_num: 105 (the first Friday after our dataset ends — October 17, 2025) - is_summer: 0 (it's mid-October) - is_nye: 0 (not New Year's Eve) - is_school_year: 1 (WWU is in fall term) Step B — The raw model prediction (show your work): Use the trained model to predict friday_night_trips for October 17. Walk through the recipe step by step: "Here is what the model predicts for Friday, October 17, 2025: 1. Start with the base: ___ trips 2. Adjust for time: week 105 → add ___ trips 3. Is it summer? No → add nothing 4. Is it New Year's Eve? No → add nothing 5. Are students on campus? Yes → add ___ trips 6. Total: ___ trips" Then print: "The model is treating October 17 as an ordinary school-year Friday. It has no way to know there's a concert." Step C — The analyst adjustment: Calculate the ratio of event-night average trips to normal school-year average trips from the Step 1 data (it should be roughly 1.6–1.8×). Since this concert is bigger than a typical past event, round up to 2.0× as a conservative staffing estimate. Calculate: adjusted prediction = raw prediction × 2.0 Calculate: lower bound = adjusted × 0.85, upper bound = adjusted × 1.15 Print: "Event nights averaged X× a normal Friday. For a sold-out concert, using 2.0×." Print: "Adjusted forecast for Oct 17: X trips (range: Y to Z)." Step D — Driver recommendation: Assume 3 trips per driver per hour. Calculate drivers needed for the adjusted prediction, lower bound, and upper bound. Step E — Surge pricing call: Assume 250 drivers online for this event (Uber would push incentives). If adjusted demand exceeds 250 drivers × 3 trips/hr capacity, recommend surge. Print YES or NO with the math. Step F — Operations memo: Print a short memo for the manager with: both the raw and adjusted predictions, driver range, surge call, and one sentence on what could push demand outside the range. Important: this code runs in Google Colab. Display all charts and output directly in the notebook — do not save any files to disk.
What you just did
You made a real forecast for a Friday that hasn't happened yet. The model ran its recipe on October 17 and predicted ~455 trips — treating it like any other school-year Friday. You knew that was wrong because the graduation Friday in Step 2 proved the model can't handle events. So you adjusted: your data showed event nights average about 1.7× a normal Friday, you rounded up to 2.0× for a bigger concert, and got ~910 trips.

The memo you sent your boss shows both numbers. That's honest forecasting — here's what the math says, here's what the math missed, here's my recommendation.

The harder lesson: the 2.0× adjustment is a patch. It works for tomorrow, but it doesn't scale. The real fix is back in Step 1 — adding an "Is it a concert night?" question to the recipe so the model can learn the answer itself next time.
Step 3 Reflection — answer both
Q1 — The gap. Look at your memo. The raw model predicted around ___ trips. The adjusted forecast was around ___ trips. Which of those two numbers would you have sent to your boss if nobody had told you about the concert?

Q2 — Fixing it for next time. The 2.0× adjustment is a patch. If you wanted the model to handle event nights on its own, what question would you add to the recipe, and what data would you need in Step 1 to teach the model the answer?
4
Stress-Test the Forecast
What happens when one thing you assumed turns out to be wrong?

You have a concert-night forecast. You have a driver number. You are not ready to send it yet.

Tomorrow's recommendation rests on assumptions that are all concert-specific: the 2.0× event multiplier from Step 3, the ~250 drivers Uber expects to attract for the concert, the 3 trips per driver per hour you assumed for the post-show rush, and the ±15% prediction interval you carried over from the backtest. Each could be wrong in ways that matter because it's a concert. The 2.0× came from your data on past WWU events, rounded up for a bigger show — a different analyst might use 1.8× or 2.5×. The 250-driver target depends on how many drivers respond to Uber's incentive push — if only 200 show up, the math changes fast. Trips per hour drops if traffic around campus seizes up after the show. None of this would worry you on an ordinary October Friday. Tomorrow night — October 17 — it should.

This is called stress-testing. At Uber, analysts run scenario models before every major event — not because they expect the worst case, but because they need to know what the worst case looks like so operations can plan for it. The question is never "will our forecast be exactly right?" It's "how wrong could we be tomorrow night, and can we still handle it?"

Why change one assumption at a time?
If you change everything at once, you cannot tell which assumption drove the change in the output. Real analysts isolate variables — change one thing, hold everything else constant, observe the effect. This is the same logic as a controlled experiment. It also makes it much easier to explain to your boss: "if driver availability drops to 15 tomorrow, the surge recommendation flips — here's why."

Instead of writing code for this step, use the simulator below. It starts with the same baseline from your Step 3 adjusted forecast: ~910 predicted trips on October 17, roughly 250 drivers expected online near campus at 10pm (Uber would push notifications to attract drivers for a known event), and 3 trips per driver per hour. At those defaults, the recommendation is fragile — small changes flip the surge call. Change them one at a time and watch what happens.

How the stress-test simulator works
  • Drivers online at 10pm — how many Uber drivers you expect to be active near campus when the show lets out. The baseline is 250 — Uber would push notifications and incentives to attract drivers for a known concert. Drop it to 200 (some drivers stay home) or raise it to 350 (surge draws them in) and watch the gap move.
  • Trips per driver per hour — how efficiently each driver moves through demand. 3 is realistic on a normal night. Post-concert traffic on Bill McDonald Pkwy could drop this to 2 or lower — and that alone can flip the surge call.
  • Demand scenario — shift between the lower bound (−15%), your base prediction, and the upper bound (+15%) from your forecast interval.
  • As you move any slider, the supply gap, estimated rider wait, and surge recommendation all update instantly. Watch for the moment the SURGE indicator at the top right flips from blue to red — that is the exact threshold where your assumptions tip the decision.
U
WWU Concert Forecast — Stress-Test Simulator
Adjust assumptions and watch the recommendation change in real time
SURGE: OFF
Assumptions
Drivers online at 10pm 250
150 (low turnout) 400 (surge draws more)
Trips per driver per hour 3.0
1.5 (traffic) 5.0 (fast)
Demand scenario Base (910)
Low (−15%) High (+15%)
What happens on October 17
Your forecast
910
trips in the hour after the show (from Step 3)
Your drivers can handle
750
250 drivers × 3.0 trips/hr
Supply gap
−91%
Estimated rider wait
25+ min
Most riders will cancel or switch to Lyft
Driver earnings per hour
$18
Normal Friday rate
✓ No surge needed
Supply meets demand at current driver levels.
Demand vs. Supply
Predicted demand (trips) 910
Driver capacity (trips handled) 750
Surge activates when demand exceeds supply by more than 20%
What you just did
You ran a stress test (also called a sensitivity analysis) — a fancy phrase for asking "what if I'm wrong?" Instead of trusting one forecast, you changed your assumptions one at a time and watched what happened. For example, dropping the number of drivers from 25 to 20 might flip the surge call from OFF to ON, while changing trips per hour barely matters. That tells you driver count is the thing your boss most needs to track — that's where the biggest risk is. Why change one thing at a time? Because if you change everything at once, you can't tell which change caused the result. It's the same logic as a science experiment: hold everything else still so you know what's actually doing the work.
Step 4 Reflection — answer both
Q1 — What's the concert-specific risk? As you moved the sliders, which assumption flipped the surge call most easily — drivers online, trips per hour, or demand level? Now connect that back to October 17 specifically: what's a real condition tomorrow night that could push that variable to a worse value? (Examples: rain, post-show traffic seizing up Bill McDonald Pkwy, drivers pulled away by another event, the show running long, more drivers coming online than expected because they saw the concert.)

Q2 — Now send the memo. You have the forecast, the analyst adjustment, and the stress test. Write 3–4 sentences to your operations manager about Friday October 17. Give them the driver recommendation, the surge call, and — based on what you learned in the stress test — the one concert-specific condition that would change that recommendation tomorrow night. Be specific with the numbers and specific about the concert.
5
The Algorithm Decides
AI Factory stage: Prediction → Decision — the prediction-decision gap lands here

In Step 3, you produced a forecast — ~910 trips — and sent it to your boss. But at Uber, the forecast doesn't stop at the boss's inbox. The moment your predicted trip count enters the system, the algorithm takes over. It compares predicted demand to available driver supply, calculates a surge multiplier, and pushes a price to every rider's screen — all in milliseconds. No human reviews it. No one approves it. The algorithm just does it.

That's fine when the forecast is right. But what happens when it's wrong? What if the model predicts a normal Friday and it's actually an earthquake? What if surge pricing fires at 4.8× while people are trying to evacuate? There's no human in the loop to say "wait — this doesn't feel right." The algorithm can't feel. It just multiplies.

The simulator below lets you be that human. For each scenario, the algorithm sets a surge price automatically. Then you make the call — do you trust it, override it, or pause it? Click one of the three decision buttons and see what happens. The outcomes are not equal.

U
Uber Surge Engine
Real-time pricing simulation
Monitoring
How to use this simulator
1. Pick a scenario below — start with the Concert to see the algorithm work, end with the Earthquake to see where it breaks down.
2. Watch the Demand vs. Supply bars update and read the surge multiplier the algorithm sets.
3. Make your decision — Trust, Override, or Pause — and see what happens.
Load scenario:
Demand vs. Supply — Live
Demand
40
Supply
38
Active events:
No unusual events
Algorithm prediction:
Demand within normal range. Surge: 1.0×
Recommended Surge
Surge Multiplier
1.0×
Normal pricing
👇 Your decision — click one:
Awaiting scenario...
What you just did
You watched the prediction-decision gap — the moment a forecast stops being information and becomes an automatic decision. Normally a model spits out a number and a person decides what to do with it. Uber's surge engine doesn't work that way: forecast → surge price → rider's screen, all in milliseconds, no person in the middle. For example, when the earthquake scenario set surge to 4.8×, no Uber employee approved that price — the algorithm just did it. That's helpful when the model is right and harmful when it's wrong. The four scenarios show why: the same algorithm can produce a fair result (concert) or an unfair one (earthquake) depending on whether the situation looks like the data it learned from. Knowing where to put a human in the loop — a checkpoint where a person reviews the decision before it goes live — is one of the most important choices in any AI system.
Step 5 Reflection — answer both using the simulator above
Q1 — When should you trust it? Load the Concert Ends scenario and choose “Trust the Algorithm,” then load the Earthquake scenario and choose “Trust the Algorithm” again. The algorithm is doing exactly the same thing both times — yet one outcome feels right and one feels wrong. What is the difference? Is it the algorithm that changed, the context, or your expectations of what the algorithm should be responsible for?

Q2 — The human in the loop. You just saw four scenarios where the algorithm made automatic decisions with no human review. Pick the one scenario where you think a human should have been in the loop before surge fired — and write one specific rule Uber could add to their system to make that happen. Be concrete: what condition would trigger the rule, and what would it do?
6
Break the Model
AI Factory stage: Value — distribution shift, model decay, and monitoring

October 17 went well. The Death Cab for Cutie, Sleater-Kinney, and ODESZA show let out at 10pm and the forecast held up. Drivers were in the right place. Riders got cars in under 8 minutes. Surge fired at 3.2×, cleared the market, and came back down by 11:30pm. Your operations manager sent you a two-word Slack message: "nice work."

It's now late November 2025 — about six weeks after the concert. Life went on. Things changed — then they changed again.

Since then, WWU announced a 12% drop in fall enrollment — fewer students on campus means quieter Friday nights. A new apartment complex opened on the north side of Bellingham, shifting where riders are actually coming from. And last week it came out that Lyft quietly launched in Whatcom County, pulling about 15% of your regular drivers onto their platform.

Your model doesn't know any of this. It is still predicting Friday nights based on the two years of history you trained it on. It passed the backtest. It worked on concert night. But the world it learned from is not the world it is predicting in anymore.

This is called distribution shift — and it is one of the most common reasons AI systems quietly fail after a successful launch. The model is not broken. It is just wrong, in ways that are invisible unless someone is watching. Every prediction it makes is based on a world that no longer exists. And every automated decision downstream — surge pricing, driver incentives, server provisioning — is based on those wrong predictions.

The simulator below lets you feel this happen. Pick a scenario, drag the slider to choose when the world changes, and watch the gap open between what the model predicts and what actually happens. That gap is not just an error number — it is the cost, in real decisions, of a model that nobody told the world had changed.

The simulator shows three numbers as you drag the slider. Here is what they mean before you start:

MAE (Mean Absolute Error) is the average size of the model's mistakes, measured in trips. If your model predicts 320 trips on a Friday night but 355 actually show up, that's an error of 35 trips. Do that across 26 weeks and average the gaps — that's your MAE. A MAE of 20 on a normal Bellingham Friday is fine. A MAE of 20 on concert night, when you need precision to staff drivers correctly, is a problem.

The simulator tracks three numbers as the world shifts. Here is what each one means:

  • MAE Before Shift — how accurate the model was before the world changed. This is your baseline, roughly what you saw in the backtest in Step 2.
  • MAE After Shift — how accurate the model is once the world has moved on and the model hasn't. Watch this number climb as the gap between prediction and reality widens week by week.
  • Error Multiplier — how many times worse the model has gotten. A 4× multiplier means it is now making mistakes four times larger than before the shift. In practice: if your pre-shift MAE was 20 trips and the multiplier hits 4×, the model is off by ~80 trips per Friday — the difference between having enough drivers and having a surge crisis.
Choose what changes in the world:
MAE Before Shift
—
trips/week
MAE After Shift
—
trips/week
Error Multiplier
—
× worse after shift
Monitoring alert threshold (20% error) —
Distribution Shift Simulator — 🎓 WWU Enrollment Drop
What you just did
You watched distribution shift happen — the technical name for "the world changed, but the model doesn't know it yet." The model isn't broken. The code didn't change. What changed is real life: WWU enrollment dropped, new apartments opened, Lyft came to town. The model still confidently (but wrongly) predicts drivers based on a Bellingham that doesn't exist anymore. For example, in the Lyft scenario the model still predicts about 380 Friday night trips because that's what its training data showed — but the real number is closer to 320 because 15% of drivers are now on Lyft. The model has no way to know that. This is why real AI systems need monitoring — automatic checks that compare what the model predicted to what actually happened, and send an alert when the gap gets too big (in your simulator, when the error crosses 20%). Without monitoring, the model can be wrong for weeks while drivers earn less and riders wait longer, and nobody knows why. And the cutoff — what counts as "wrong enough to act on" — is a business decision, not a technical one.
Step 6 Reflection — answer both using the simulator
Q1 — Pick a scenario and trace the damage. Run one of the three scenarios — WWU enrollment drop, new apartments, or Lyft entering Bellingham — and drag the slider so the world changes early. Look at the Error Multiplier and the weeks before the monitoring alert fires. That window is real: Uber is still making driver bonuses, surge pricing, and staffing decisions based on a model that is quietly wrong. Using the specific scenario you chose, describe in 2–3 sentences what distribution shift actually means here — what changed in the real world, why the model doesn't know, and what a Bellingham driver or rider would experience during those undetected weeks.

Q2 — AI Governance. The monitoring alert in the simulator is just a threshold check — someone had to decide what that threshold should be, build the check, set a policy for who reviews it when it fires, and give that person authority to pause the model. Each of those is a governance decision, not a code decision. Based on what you saw, write 2–3 sentences on what an AI governance policy for this forecasting model should include — who is accountable when the model runs wrong for weeks undetected, and what rule would you put in place to prevent that from happening silently?
7
Drive for Uber
🎮 Interactive game — feel the forecast from both sides, as a driver and a rider

In Step 6 you watched distribution shift happen in a simulator — a chart, some numbers, an error multiplier climbing. Now you are going to feel it from the inside.

You have spent this lab as the analyst: pulling data, building the model, backtesting it, stress-testing it, sending the memo. Every decision you made was at a desk, looking at charts. Step 7 puts you on the other side. You are now a driver in Bellingham on a Friday night. The algorithm tells you where demand is high. Your job is to decide whether to follow it — and to notice when something feels off.

Every surge multiplier you see in this game was calculated by a forecasting system running the same logic as the model you built in Steps 1–3 — it reads historical Friday night trip patterns, predicts where demand will be, and sets a price automatically. No human approved each number. That is what happens when the forecast triggers the decision instantly, at scale.

You will play 6 rounds. Each round you see a situation — a time of night, conditions in the city, what the algorithm is predicting — and you choose where to drive. Then you see what you earned, and what your rider experienced.

Rounds 1–3 are stable. The forecast is accurate. Learn the rhythm. Rounds 4–6 — something changes in the world, and the forecast does not know. You will not be told when it happens. Pay attention.

🚗
You are driving for Uber in Bellingham, WA
It is a Friday evening near WWU campus. Your shift starts now. The algorithm will tell you where demand is high — your job is to decide whether to follow it.
What you just did
You experienced distribution shift from the driver's seat. In rounds 1–3, the algorithm earned your trust — it pointed you to the right zone every time, and you made money following it. Then the world changed and the algorithm didn't. The critical design choice: rounds 4–6 looked identical to rounds 1–3 in the app. Same green signal, same confident recommendation, same multiplier format. Nothing in the interface changed. The only signal was your own earnings dropping — and even that could have felt like a bad night, not a broken model. That's the real lesson. Distribution shift doesn't announce itself. If you followed the algorithm in round 4 (most people do — you'd been rewarded for it three times in a row), you earned $11 instead of $31. That gap is what a wrong model costs a real driver. And the debrief showed you the bigger number: a driver who always followed the algorithm across all 6 rounds earned significantly less than one who noticed and adapted. The algorithm never told either driver anything was different.
Step 7 Reflection — answer both after completing all 6 rounds
Q1 — When did you break from the algorithm? Look at your debrief stats. How many times did you follow the algorithm's recommendation? If you followed it in round 4 (the first broken round), what was the outcome — and what made you change your behavior in rounds 5 or 6 (if you did)? If you never broke from the algorithm, what would have had to happen for you to stop trusting it? Connect this to the Step 6 simulator: the gap between the predicted line and the actual line on that chart is the same gap between what the algorithm told you and what you actually earned.

Q2 — The algorithm never explained itself. In rounds 4–6, the app looked exactly the same as rounds 1–3 — same green signal, same confident numbers. It never said "warning: this recommendation may be less reliable than usual." Based on what you experienced: should Uber be required to tell drivers when the model's accuracy has degraded? What would that look like in practice — and what happens to Uber's driver supply if drivers can't trust the algorithm but also can't tell when it's wrong?
8
Publish to GitHub
Put everything you built into one shareable HTML page, live on the web

This is the final step — and it is the one that makes everything real. You are going to publish a webpage that shows a recruiter what you actually built. Not a summary of the lab. Not Claude's words. Your work, your outputs, your analysis.

Think about what that means. A recruiter who clicks your GitHub link has 60 seconds. They want to see: can this person take a real business problem, build something with AI tools, and explain what they found? Your page needs to answer that with evidence — your actual chart, your actual forecast numbers, your actual concert night memo, your own written analysis connecting all of it.

🔍 Pause and notice — you just did AI Prototyping
Before you build the final page, stop and notice what you have done over the past several hours. You described what you wanted in natural language. Claude wrote the code. You ran it, looked at the output, decided what to change, and asked Claude to change it. You iterated your way to a working forecast, a backtest, a surge recommendation, and a distribution shift analysis — in one afternoon — without writing most of the code yourself. This workflow is called AI Prototyping and it is exactly how Uber's product teams now turn rough ideas into working products in hours rather than weeks. The cost of making an idea tangible has dropped to nearly zero. You are not learning to replace engineers. You are learning to do the thing that used to be too expensive to even try.

Before you send the prompt below, fill it in. Copy the entire prompt, paste your actual content from Colab where indicated, then send the whole thing to Claude in a fresh conversation. It will come back as a finished page.

Here is what to collect before you start:

  • Your two MAE numbers — from Step 2, copy the two numbers your code printed: the overall MAE and the event-Friday MAE. Example: "Overall MAE: 24 trips. Event-Friday MAE: 89 trips." Claude will build a simple visual comparison directly in the HTML — no image file needed.
  • Your October 17 memo — from Step 3, copy the exact plain-English operations memo your code printed. It should include both the raw model prediction and the analyst-adjusted forecast (with the 2.0× event multiplier), the driver recommendation, and the surge call.
  • Your stress-test finding — from Step 4, recall what you saw in the simulator. Write 2–3 sentences naming the assumption whose slider had the biggest impact on the surge call, and the concert-specific condition tomorrow night that could push that variable in the wrong direction. (Examples: rain, post-show traffic, drivers pulled away, show running long.)
  • Your Step 8 reflection — write it now, before you send the prompt. It goes in last.
Prompt 8 — paste into a fresh Claude conversation to build your page
I am a student in MIS 432: AI in Business at Western Washington University. I just completed a lab building Uber's demand forecasting system from scratch. I need you to build a complete, self-contained HTML page I can publish to GitHub Pages as a portfolio piece. The page should showcase my actual work from the lab — not a generic summary. Here is everything to include: SECTION 1 — THE BUSINESS PROBLEM (you write this) One punchy paragraph explaining why demand forecasting is the foundation of Uber's entire business. No jargon. Direct. A recruiter who has never heard of Uber's AI system should understand it in 30 seconds. SECTION 2 — THE DATA AND THE MODEL (I will provide my numbers) Write 3–4 sentences explaining what I did in Steps 1 and 2: I pulled two years of historical Friday night trip data near WWU campus in Bellingham (Oct 2023 – Oct 2025), identified trend, seasonality, and a handful of past event nights, and used the calendar features to train a linear regression forecasting model. I backtested it two ways: overall MAE on the test window, and MAE specifically on event-like Fridays. Then create a simple HTML/CSS bar chart or visual directly in the page showing my two MAE numbers side by side — here are my actual results: [PASTE YOUR TWO MAE NUMBERS HERE — e.g. "Overall MAE: 24 trips. Event-Friday MAE: 89 trips."] Below the chart, write one sentence: "The overall MAE looked acceptable. The event-Friday MAE — the number that matters for a concert night — was significantly larger. That gap is why the analyst had to step in." SECTION 3 — THE OCTOBER 17 PREDICTION (my actual memo) Write one sentence introducing this section: "Here is the actual operations recommendation I produced for the Death Cab for Cutie, Sleater-Kinney, and ODESZA homecoming concert at WWU on Friday, October 17, 2025 — the raw model number and the analyst-adjusted forecast." Then insert this placeholder where I will paste my memo: [PASTE YOUR CONCERT NIGHT MEMO HERE — copy the exact text your Step 3 code printed, including BOTH the raw model prediction and the adjusted forecast with the 2.0× event multiplier] SECTION 4 — STRESS-TESTING THE FORECAST (my actual finding) Write one sentence: "Before sending that memo, I stress-tested the key assumptions in a simulator to understand how fragile the recommendation was on a concert night." Then insert this placeholder: [PASTE YOUR STRESS TEST FINDING HERE — describe the assumption that flipped the surge call most easily when you moved the sliders, and the concert-specific condition tomorrow night that could push it that direction] Below it, write 2 sentences about what stress-testing means in practice — why a real analyst runs it before committing to a recommendation, especially for a one-off event like a concert. SECTION 5 — WHEN THE ALGORITHM DECIDES (you write this) 2–3 sentences explaining the prediction-decision gap: how Uber's algorithm takes the forecast number and automatically sets the surge multiplier with no human review, and what that means when the model is right vs. when it is wrong (earthquake scenario). SECTION 6 — WHEN THE MODEL BREAKS (you write this) 2–3 sentences explaining distribution shift using the Bellingham scenario: six weeks after the concert, WWU enrollment dropped, new apartments opened in Cordata, Lyft entered the market — and the model had no idea. Drivers earned less. Riders waited longer or switched apps. Nobody told them why. SECTION 7 — MY ANALYSIS (my reflection answer) Insert this placeholder where I will paste my Step 8 reflection: [PASTE YOUR STEP 8 REFLECTION HERE — write it before sending this prompt] DESIGN: - Uber brand colors: black (#000000) background, cyan (#1fbad6) accent, white text - Clean professional layout, nav bar: "MIS 432 · AI in Business · Western Washington University" - Each section scannable in 10 seconds with a clear header - All CSS inline — no external files or CDN dependencies - Single .html file ready to upload to GitHub Pages Generate the complete HTML file with all placeholders clearly marked so I know exactly where to paste my content.
What you just did
You used AI prototyping to build something real. The pattern: describe what you want in plain English, let Claude write the code, run it, look at what came out, ask for changes, and repeat. For example, in Step 1 you didn't write the data simulation yourself — you described the patterns you wanted (trend, seasonality, school-year effect), Claude wrote the Python, and if anything looked off you could ask it to fix it. You did that same loop eight times in this lab, all the way to a finished portfolio page. The whole lab was built this way too — every chart, simulator, and game on this page came from the same back-and-forth. The technical work matters, but so does this skill: turning a fuzzy idea into a real working thing in hours instead of weeks. That's what makes someone valuable in a job that uses AI tools.
Step 8 Reflection — write this before building your page
You have now seen Uber's AI system from every angle — analyst, builder, stress-tester, observer, and driver. In one paragraph, describe how the steps connect: how a decision made at the data stage in Step 1 ultimately affects what a rider pays and what a driver earns six weeks later. Then add one sentence: if you were building this forecasting system for a real Bellingham business, what is the one thing you would add that this model didn't have?
✅ What to Submit

Submit two things: your GitHub Pages URL and a Word or PDF document with your answers to every reflection question below.

← Chapter 4: Uber Is AI Chapter 5: Waymo →