Start with slopes and curves. Follow small steps downhill, then see how the same idea helps train AI.
Write your answer, then choose Check answer for feedback. Short formulas are checked mathematically. Written feedback identifies key ideas and suggests what to add; open the example to compare your reasoning. Press Enter in a short-answer field, or Ctrl/⌘ + Enter in a written response.
Click and drag to rotate the paraboloid!
Drag to orbit the valley. The person stays visible as you compare the terrain from different angles.
Yes! The world is messy and we can't just plug stuff into equations. As we have a bunch of data, we can't rely on the quadratic formula, completing the square, etc. I mean it would be insane to solve quartic equations by hand with this nightmare formula:
So what in the world do we do? We use computers!
At each point, we can calculate the slope at that point and use it to decide which downhill step to take.
Spoiler for Q10: Computers can think like someone standing at the edge of a paraboloid, and make small steps downward until it knows the slope is flat. Remember that line we drew through the vertex of the parabola from Q4? Computers can figure that out, but in 3D too.
In Algebra II mode, we can say the slope is flat when the secant plane has no incline, like a perfectly level sheet across the bowl.
Computers really just make a bunch of educated guesses until it gets close enough to the result we want: the lowest point of the paraboloid.
This is the concept of Gradient Descent, a foundational reason why ChatGPT works!!
You just learned the concept of Stochastic Gradient Descent! You can now connect slopes, small updates, and prediction errors to training AI!
Stochastic is a fancy word for random.
In actual SGD, the computer selects a random group of training examples and uses their prediction errors to estimate a downhill direction. Different groups can suggest different steps; more randomness does not guarantee a better answer.
Some shakiness is good, but too much causes the marbles to fall out, so we need just the right amount.
The moving marbles illustrate wandering and settling. With a fixed dataset and error measure, fitting moves a candidate across a fixed error surface. The shaping bowl later is a visual story about learning patterns. Temperature is different: it matters later, when ChatGPT is actually writing its response.
Instead of marbles in weird bowl holes, instead picture the depth of the hole as reducing pollution, saving resources, etc.
You think that’s crazy? It’s about to get nuts.
P.S.: What we talked about today is exactly why TikTok and Instagram Reels are so addicting and the Oxford Word of the Year is “Rage Bait”. The “marbles at the bottom of the bowl” for social media have to do with watch time, comments, and shares. Outrage and dishonesty is more effective at this than positivity and the full truth.
One last note: examples like walking down a hill blindfolded, shaping a bowl, and dropping marbles into a bowl are analogies. They are not a perfect representation of how AI works, but they help get the general ideas across.
Thank you so much for listening and participating!!
Fictional arcade. Real statistics.
Scoop up space snacks, dodge asteroids, and rack up points! Twelve players tried our (totally made-up) arcade game. Each one told us how many warm-up rounds they played and what they scored in one challenge round. Their scorecards are right below.
Meet Byte, the arcade’s little robot. Byte wants to guess a typical score, and its first guess is… 60 points. Hmm. Your mission is to teach Byte to learn from the scorecards, make better and better guesses, and eventually predict a score from how much someone practiced.
Read a few scorecards → update the guess → try again
Final exam warm-up: Questions 1–8 double as review. Look for the Exam-style parts: center and shape, residuals, regression predictions, r², study design, and extrapolation. Give each one a real try before you hit Reveal answer!
If you’ve seen the mean, scatterplots, and residuals in class, you already have everything you need. One heads-up before we start: in our data, more practice goes along with higher scores, but that does not prove practice caused it. Maybe the people who practiced more had also played a ton of games before!
| Player | Practice rounds | Arcade score |
|---|---|---|
| Astro | 0 | 62 |
| Bloop | 1 | 68 |
| Comet | 2 | 60 |
| Doodle | 3 | 72 |
| Echo | 4 | 70 |
| Fizz | 5 | 78 |
| Gizmo | 6 | 74 |
| Hex | 7 | 84 |
| Iggy | 8 | 82 |
| Jinx | 9 | 80 |
| Koko | 10 | 90 |
| Luma | 11 | 92 |
Byte needs a fair score to aim for. Forget about practice rounds for a second. If you average all 12 arcade scores, what do you get? That’s the sample mean, x̄, from class. (Close counts: small rounding differences are fine.)
Exam-style Now find the median score and compare it with x̄. What does that tell you about the shape of the distribution?
Add up all the scores and you get 912. Split that across 12 players: 912 ÷ 12 = 76 points. If a different group of 12 people walked in, their average could come out a little different.
Median: in order, the scores are 60, 62, 68, 70, 72, 74, 78, 80, 82, 84, 90, 92. With 12 values, the median is the average of the 6th and 7th: (74 + 78) ÷ 2 = 76 points. The mean and median match, which suggests a roughly symmetric distribution with no strong skew. (If the distribution were skewed right, the mean would usually get pulled above the median.)
Byte guesses that everyone will score 70. Then Iggy walks up and scores 82. Oops! How far off was Byte? Take the real score minus Byte’s guess. You know that gap: it’s the residual, actual − predicted (or y − ŷ).
Exam-style After you check your number, interpret the residual in context, in one sentence.
82 − 70 = 12 points. A positive residual means the prediction was too low, just like in class, so Byte underestimated Iggy by 12 points. Exam-ready sentence: Iggy’s actual score was 12 points higher than Byte predicted. Here’s a handy trick: if you square every miss, guessing too high and guessing too low both count as positive error, so they can’t cancel each other out. Byte’s whole goal is to make the average of those squared misses as small as possible.
Byte starts at 60 points and peeks at Jinx’s scorecard: 80 points. Byte shouldn’t leap all the way to 80 just because of one person, so it moves only one quarter of the way from 60 toward 80. Where does Byte’s new guess land?
new estimate = old estimate + step fraction × (selected score − old estimate)
60 + 0.25 × (80 − 60) = 65. That 25% decides how big of a step Byte takes, and in AI it’s called the learning rate. A bigger learning rate means bigger jumps each time Byte updates its guess.
If Byte looks at all 12 scores at once, it always gets pulled toward the same spot: their average, 76. But what if Byte only grabs one random scorecard each time? Why might two of those one-card steps point in different directions?
Because people scored differently! Astro got 62, Iggy got 82, and Jinx got 80. The table never changes, but which card Byte happens to grab does. That random grab is the stochastic part of stochastic gradient descent (SGD). “Stochastic” is just a fancy word for random. Notice we aren’t shaking the graph around; we’re only picking random rows.
Make a guess first: will Byte’s path look smoother if it uses 1 scorecard per step, or all 12? Now try both and see if you were right. Every step really grabs rows from the table above and nudges Byte toward their average.
Take a step to see which players were selected.
Starting estimate: 60 points. The full-sample mean is 76.
The curve shows Byte’s average squared miss across all 12 players for every possible guess. Watch closely: a step based on a few random cards (a mini-batch) can sometimes push that error up for a moment before later steps bring it back down.
Using all 12 cards gives the exact same direction every time, so the path is smooth. Using just a few cards is quicker per step, but the path wobbles because each random group points somewhere a little different. And more wobble doesn’t mean a better answer, just a bumpier ride.
Here’s a cool connection: the bottom of this curve sits exactly at the mean, 76. That’s no accident. The mean is the one number that makes the squared deviations as small as possible. The height at the bottom (about 95.3) is the average squared deviation, and its square root, about 9.76, is the σx your calculator shows in 1-Var Stats. Byte is basically rediscovering the mean and standard deviation by trial and error!
Did a few warm-up rounds help people get the hang of Meteor Munch? Time for a scatterplot like the ones from class, with x = practice rounds and y = score. Byte’s prediction line is ŷ = a + bx. Drag the sliders until the line passes close to the dots. Each little vertical segment is a residual: the gap between a player’s real score and the line’s prediction. Once it looks good, interpret the y-intercept and slope in context, the way you would on a test.
Exam-style Turn on the best-fit reference. Its equation is ŷ = 61.46 + 2.64x, with r ≈ 0.935. Use it for three classic final-exam questions.
(a) Predict the score for a player with 6 practice rounds.
(b) Gizmo had 6 practice rounds and scored 74. What is Gizmo’s residual?
(c) What is r²? Then interpret it in context.
When you press Fit, Byte adjusts the line’s height and tilt using the misses of the players it picked. Don’t worry, you don’t have to calculate those adjustments by hand. That’s the computer’s job! The dashed line (when you turn it on) is the least-squares regression line (LSRL), the same line LinReg(a+bx) gives you on a graphing calculator. Byte finds it by taking small steps instead of using the formula.
The LSRL is about ŷ = 61.46 + 2.64x (r ≈ 0.93, a strong, positive, linear association). In context: for each additional practice round, the predicted score increases by about 2.64 points, and a player with 0 practice rounds has a predicted score of about 61.5 points. Remember, though: this shows that practice and scores go together in our sample. It doesn’t prove practice is what caused the higher scores.
(a) ŷ = 61.46 + 2.64(6) = 77.3 points. (b) Residual = 74 − 77.3 = −3.3 points: Gizmo scored about 3.3 points lower than the line predicted, so the line overpredicted. (c) r² = 0.935² ≈ 0.87. In context: about 87% of the variation in arcade scores is accounted for by the linear relationship with practice rounds.
There are two kinds of “random” hiding here, and they’re easy to mix up. First, rerun a short training with the same 12 scores but different random cards. Then invite brand-new groups of 12 from a bigger (made-up) arcade crowd. Which results change because Byte’s steps changed, and which change because the data changed? (Hint: one of these is the sampling variability you studied with sampling distributions.)
Exam-style One more classic. Players chose how many practice rounds to play. Is this an observational study or an experiment? Can we conclude that practice causes higher scores? How would you design a study that could?
Same data, different random cards: short runs can stop at slightly different spots just because Byte grabbed different rows. New crowd: x̄ itself changes, because these are different people. That’s sampling variability, the same idea behind a sampling distribution. Don’t mix the two up! The wobble from Byte’s random steps doesn’t tell you how sure you can be about everyone at the arcade. (So it isn’t a confidence interval.)
Study design: this is an observational study, because nobody assigned the practice rounds; players picked them. So we can’t conclude cause and effect. To test causation, run an experiment: randomly assign players to different numbers of practice rounds, then compare their scores. Random assignment balances out lurking variables like gaming experience.
Byte’s guesses have finally calmed down. So is it ready to predict scores for every player on opening night? Explain where SGD’s randomness came from, and what you’d want to check before you trust Byte.
Exam-style Use ŷ = 61.46 + 2.64x to predict the score for someone who plays 30 practice rounds. Should you trust that prediction? Why or why not?
SGD’s randomness came from picking different players’ scorecards to decide each step. A settled answer only means the math has calmed down for this data. Before trusting Byte, I’d ask the same questions you ask in class: Does a residual plot show a pattern, meaning a line isn’t the right shape? Were these 12 players a random sample, or just whoever showed up? Am I extrapolating, say to someone with 30 practice rounds? And could a lurking variable, like gaming experience, explain the pattern?
Extrapolation: ŷ = 61.46 + 2.64(30) ≈ 140.7 points. But our data only covers 0 to 11 practice rounds, so 30 is far outside it. Nobody scored above 92, and scores probably level off eventually. Predicting far outside the x-values in your data is extrapolation, and it’s unreliable.
You have already used prediction errors to improve an estimate. Now picture that same idea as a marble moving through a bowl, and follow it into the familiar word and AI animations.
The error curve in Question 5 was a bowl seen from the side. For the fitted line, we can move in two directions: change its starting height or change its slope. Imagine a bowl whose height measures the error for each possible line.
| In the picture | In our arcade-score model |
|---|---|
| A marble's position | One candidate line, with a particular starting height and slope |
| Height above the bottom | How much prediction error that line makes |
| A small move downhill | An update aimed at reducing prediction error |
| The bottom | The best-fit reference for the data we have |
This animated bowl illustrates a more complicated error landscape, with several dents. Our sample-mean and straight-line problems each have one best solution. Their bowls stay fixed while we change the estimate. In real SGD, varying directions come from randomly selected rows, as you saw in Question 5.
Try little shaking, then lots. What does a marble that keeps bouncing remind you of in our small-batch estimator? Does a bouncy path prove the final answer is more accurate?
The marble represents a candidate fit, and its height represents prediction error. Bouncing resembles the varying updates made from different small groups. More movement does not guarantee a better estimate. Our actual simulator calculates steps from selected players; the shaking slider here controls the physical analogy.
Our arcade scorecards represented each person using numbers: practice rounds and arcade score. AI language models also work with numerical representations, including lists of numbers called vectors. This playful diagram uses a few made-up features to show how words can be placed near words with related features.
These axes and word positions are invented for the illustration. Changing the lens or scanner changes what you see; it does not train a model. Actual language models learn many numerical features rather than using this small hand-labeled map.
Change the lens and move the scanner. Why might two numbers be too few to describe all the patterns in language?
Two numbers were enough to record our arcade example. Language has many patterns, such as meanings, context, and relationships among words. More numerical features let a model represent more of those patterns. We can draw a few directions on screen even when the model uses many more.
Think back to the line slowly fitting our scatterplot. A language model also makes predictions, measures its misses, and updates its learned numbers. Watch the words move into place and the bowl take shape: both pictures tell the story of learning patterns from examples.
The shaping bowl is a visual story about a model becoming organized through learning. In our actual fixed-data error plot, training moves the estimate across a fixed surface. The moving words and changing bowl are illustrations, not calculations from the 12 players.
What plays the role of arcade-score prediction error when a language model is learning to predict the next piece of text?
The model assigns probabilities to possible next pieces of text. Training compares those predictions with what actually followed in the example, then adjusts the learned numbers. It uses a different error measure from our squared arcade-score errors, but the idea of predicting, measuring error, and updating carries over.
Once a model is trained, it can use what it learned to make a new prediction. In this animation, the model assigns probabilities to possible next words. Temperature changes how concentrated those choices are. Predict what will happen to the probability bars when you turn it up, then try it.
The bars show probabilities for this toy word example. Lower temperature concentrates the choices; higher temperature spreads them out. The moving marbles illustrate that variety. Choosing an output does not refit our arcade-score line or train the language model again.
Our line and a language model both learn by using prediction errors to update numbers. During SGD training, randomness comes from choosing examples for an update. During output generation, randomness can come from sampling a possible next piece of text. Temperature affects those output probabilities; it is not our learning rate or batch size. A fluent output, like a stable fitted line, still needs checking.
Surprise guest Nova shows up and hits a jackpot score of 100 points! What happens to x̄? Could Nova be an outlier, or even an influential point that drags the regression line? Then go back to Question 5 and try a 125% step. Does every step make the full-data error smaller?
x̄ goes up from 76 to about 77.85, because 100 is above the old mean. (The mean isn’t resistant, remember? The median would barely move.) A high score can pull the LSRL toward it, especially if Nova’s practice rounds are far from everyone else’s. That’s what makes a point influential. And a 125% step jumps past the target, so the error doesn’t always go down. Byte can overshoot!
Arts night is coming, and your team gets one hour to run a pop-up café. Byte, your very enthusiastic robot intern, has a plan: “Charge $100 a cup. Problem solved!” Yeah… I think Byte needs a better model.
Your mission: pick a price that makes money for the event, keeps the café friendly and affordable, and doesn’t leave you with a mountain of leftover cups. You’ll build a model, test whether it actually predicts well, then pitch your plan.
Grab a partner. One of you is the model builder; the other is the skeptical event organizer who pokes holes in everything. Swap jobs halfway through. Everything below (the events, prices, and data) is made up, not real school records.
Final exam warm-up: Questions 1–8 double as review. Look for the Exam-style parts: linear models and systems, residuals, solving linear equations, quadratics and vertices, and checking a model against new data. The bonus covers exponentials, logarithms, and trig. Give each one a real try before you hit Reveal answer!
A model is a simplified version of the real world that’s still useful. Here’s the loop we’ll run: ask → assume → build → test → revise → decide. No calculus needed! Plan on about an hour, and save the bonus missions for later.
Your written responses stay in this browser when storage is available.“Make the most money” sounds like a goal, but it leaves a lot out. What is the one thing your team actually has to decide? Then name one way you’d measure success, and one thing you’re assuming that you’d need to double-check.
The decision is the price per cup. Profit per hour is one way to measure success, but affordable prices, short lines, and less waste matter too. You’re probably assuming that attendance, cup sizes, serving speed, and weather will be about the same as when you collected data. Those are assumptions, so they need evidence. And here’s the thing: the price with the highest profit on paper might not be your team’s best choice.
Your team makes two quick guesses: at $3 a cup, you’d sell about 64 cups an hour; at $6 a cup, about 28 cups an hour. Let’s call the price p (dollars per cup) and the number of cups people want q (cups per hour). The simplest model to try is a line: q = a + bp. That’s just slope-intercept form (y = mx + b) with letters that match the story: q plays the role of y, p plays the role of x, b is the slope, and a is the intercept.
64 = a + 3b and 28 = a + 6b
Subtract one equation from the other to get rid of a. What is b? Before you check, think about it: what does it mean that b is positive or negative?
Exam-style Now find a. Then interpret the slope in context, in one sentence.
28 − 64 = (6 − 3)b, so b = −12. Plug that back in: 64 = a − 36, so a = 100. Our first model is q = 100 − 12p. The negative sign makes sense: every extra dollar means about 12 fewer cups sold per hour. Careful, though. The model says “100 cups if coffee is free,” but we never tested a $0 price. That’s an extrapolation, a guess outside our data. Stick to the $3–$6 range until you have more evidence.
Exam-ready sentence: for each $1 increase in price, the model predicts about 12 fewer cups sold per hour.
Guesses are nice, but real data is better. So the team runs seven one-hour test cafés, called pilots (still made-up data). These are the points we’ll fit our line to, and as you’ll see, they don’t match the two guesses exactly. Every pilot used the same cup size, and let’s assume each one could serve everybody who wanted a drink.
| Pilot | Price ($/cup) | Sold (cups/hour) | Used in last step? |
|---|
At $4.50, our first model predicts 46 cups an hour, but the pilot actually sold 48. How far off was the model? Find the residual: what really happened minus what the model predicted.
48 − 46 = +2 cups/hour. Positive means the model guessed too low. To decide which line is best overall, we square each pilot’s miss and average them. Squaring makes sure misses that are too high and too low can’t cancel out. One reminder: even a line with tiny errors doesn’t prove that price is what caused the sales to change.
Try moving the line by hand first. Kind of tricky, right? Now let Byte do it. Before you press anything, make a prediction: will Byte’s path look smoother using one pilot per step, or all seven? Run both and find out. Every step really is calculated from the highlighted pilots.
Each step, Byte grabs a fresh random group of pilots, called a batch. Different groups can point Byte in slightly different directions, so a single step can sometimes make the overall error go up. With small batches, the line may keep jiggling around instead of settling perfectly. (Behind the scenes, the page rescales price so both sliders can use reasonable step sizes.)
Using all seven pilots gives the same direction every time, so the path is smooth. Smaller groups look at less data per step, so the path wobbles more. The best-fit line turns out to be q = 100 − 12p, with an average squared error of about 3.14 (cups/hour)². Fun fact: it’s the same line you’d get by typing the seven pilots into your calculator and running linear regression (LinReg). Byte just gets there one step at a time, which is how AI learns. That’s stochastic gradient descent (SGD): each random group gives Byte a best guess for which way is downhill. It’s random data, not random shaking.
Selling a lot of cups is great, but cups aren’t free! Use q = 100 − 12p. At $5 a cup, you’d expect to sell 40 cups an hour. Each cup costs you $1.25 in supplies, and there’s also $30 an hour in fixed costs (stuff you pay no matter what, like renting the table).
revenue = price × cups sold
cost = fixed cost + cost per cup × cups sold
profit = revenue − cost
How much profit should you expect for the hour? Byte, of course, counted every dollar that came in as profit. Show Byte where it went wrong.
Exam-style Still at $5 a cup: how many cups per hour do you need to sell just to break even (profit = $0)?
Money coming in (revenue): 5 × 40 = $200. Money going out (cost): 30 + 1.25 × 40 = $80. So profit is $120, not $200, Byte. Also, if your model ever predicts something like 41.7 cups, that’s fine! It’s an average rate, not a claim that you’ll sell 0.7 of a cup.
Break-even: set revenue equal to cost: 5c = 30 + 1.25c, so 3.75c = 30 and c = 8 cups per hour. Every cup after the 8th adds $3.75 of profit.
Here’s a real-world wrinkle: your team can only make 40 cups an hour. What happens if more people than that want coffee? This planner uses whatever line you ended with in Question 4. Play around: double the capacity, change the costs, and slide the price. Does “sell more” always mean “earn more”?
Exam-style Ignore capacity for a moment. With demand q = 100 − 12p and the default costs, profit is P(p) = −12p² + 115p − 155. At what price is profit greatest? Round to the nearest cent.
cups sold = the smaller of expected demand and capacity (a piecewise function!)
profit = (p − cost per cup) × cups sold − fixed cost
With q = 100 − 12p and room for only 40 cups, solve 100 − 12p = 40 to get p = $5. Go cheaper and the line gets longer than you can serve, so you just earn less per cup. Go pricier and you lose enough customers that profit drops. The best price on our 25¢ slider is $5, for $120 expected profit. Here’s the cool part: without the 40-cup limit, profit = (p − 1.25)(100 − 12p) − 30 = −12p² + 115p − 155, a downward parabola. Its vertex is at p = −b/(2a) = 115/24 ≈ $4.79. Your Algebra II vertex formula shows up in business! But at $4.79, people would want 42.5 cups an hour, and you can only make 40. Once capacity kicks in, $5 wins. A real-world limit can change the answer. And remember, “best” depends on what goal you chose.
A nice-looking line isn’t the finish line. The real test is whether it predicts days it has never seen. We kept three new observations hidden from Byte the whole time. First, predict: what might a rainy-day crowd do to the model? Then reveal the checks. Should Byte keep fitting the old pilots, or go collect new evidence?
Exam-style On the rainy day, the café charged $3.75 and sold 34 cups/hour. Using q = 100 − 12p, what is the residual? What does its sign tell you?
| Price ($/cup) | Observed (cups/hour) | Predicted (cups/hour) | Residual (cups/hour) |
|---|
On a similar day, the best-fit line’s average squared error is just 2. On the rainy day? About 262.33 (cups/hour)². Yikes! Running SGD on the old pilots again and again won’t help, because those pilots never included rain. Byte needs new data, and maybe a new model that knows about weather. (One more sneaky issue: if a pilot ever ran out of cups, we’d never know how many people wanted one. We assumed that didn’t happen.)
Rainy residual: predicted 100 − 12(3.75) = 55 cups/hour, actual 34, so the residual is 34 − 55 = −21 cups/hour. A big negative residual means the model badly overpredicted, which is a sign it’s missing something (here, the weather).
Time to pitch! Write four sentences: (1) your price, (2) the profit you predict, with units and your serving limit, (3) one tradeoff or assumption, and (4) what you’d check next. Then your partner, the skeptical organizer, gets to challenge one of your claims. Bonus thought: would offering reusable cups or a lower price change what “best” means to you?
Here’s one example: “We recommend $5 per cup, which our best-fit model predicts will earn about $120 in one hour if we can serve 40 cups. That assumes the crowd looks like our pilot days. A lower price might feel more welcoming, and reusable cups could change our costs and our waste. Before buying supplies, we’ll check expected attendance, how many people can staff the table, and the weather forecast.” It’s also totally reasonable to choose affordability or less waste over the highest possible profit.
The two numbers a and b locate a candidate demand model. Imagine the bowl's height is its prediction error: lower means a better fit. Each batch of café pilots suggests a small move.
This shared bowl has several dents to illustrate more complicated optimization. Our fixed-data, squared-error line fit has one best-fit solution and a fixed error surface. Fitting moves the candidate across that surface. The shaking slider is an illustration; the actual random-pilot updates are in Question 4. The price-planning curve is a separate decision model.
What corresponds to the marble, its height, and one step in our café example? Why doesn't reaching the bottom prove the rainy-day predictions will work?
The marble is a candidate pair (a, b); height is the average squared prediction error on the training pilots; a step updates a and b using selected pilots. The bottom gives the best fit to this dataset and model family. It does not validate our assumptions, new-day predictions, or final price recommendation.
Our model turns numbers into predictions. Language models also use numerical features, but far more than our price and demand. Explore these invented word features, watch the learning story, then change output temperature.
These word positions and axes are invented for the illustration. Moving the scanner changes the view; it does not fit our café model.
The moving words and shaping bowl tell a visual story about learning patterns. Our real café fitting calculations move coefficients over a fixed error surface. Language models use a different prediction-error measure.
Temperature changes the toy model's next-word probabilities after training. It is different from the step fraction or the number of pilots in an SGD update.
Both fitting processes use prediction errors to adjust learned numbers. Selecting a price uses the fitted demand model plus costs, capacity, and goals; it does not refit the line. AI output temperature changes how concentrated possible outputs are; it does not train the model again. Predictions, recommendations, and fluent AI outputs all need evidence and judgment.
Going viral (sort of): you post about the café and it gets 30 views. Every hour, views grow by 25%. Growing by 25% means multiplying by 1 + 0.25 = 1.25 each hour, so the model is V(t) = 30(1.25)t. How many views does the model predict after three hours? And why can’t this growth go on forever? (Also, a view isn’t the same as someone buying coffee!)
Exam-style How many hours until the model first predicts 100 views? Solve 30(1.25)t = 100 using logarithms. Round to 0.1.
Poster photo: you want a photo of the café banner. The top of the banner is 2.4 m above your camera, and you’re standing 1.8 m away from it. How far up do you need to tilt the camera to aim at the top? That tilt is the angle of elevation. Sketch the right triangle, and make sure your calculator is in degree mode.
V(3) = 30(1.25)³ = 58.59375 ≈ 58.6 views. It can’t grow forever because there are only so many people around to see it, and people stop sharing after a while. For the photo, tan θ = opposite/adjacent = 2.4/1.8, so θ = tan⁻¹(2.4/1.8) ≈ 53.1°. Bonus: the straight-line distance to the top is exactly 3 m (it’s a 3-4-5 triangle in disguise!). Logs: divide by 30 to get 1.25t = 10/3, then t = log(10/3) ÷ log(1.25) ≈ 5.4 hours. Your answer is only as good as your measurements, and the wall needs to really be straight up.
Designed for an Introduction to Mathematical Modeling class, grades 11–12, with Integrated III preparation. This is one guest lesson, not a semester curriculum. Use pairs and pause for predictions before pressing Run. Calculators are enough; coefficient-update derivations are optional teacher background.
50-minute route: mission and systems (Q1–3), 12 min; fitting (Q4), 8 min; profit, constraints, and validation (Q5–7), 15 min; partner pitch (Q8), 5 min; bowl and AI discussion (Q9–10), 10 min. For a shorter visit, demonstrate the AI widgets rather than exploring each lens. Bonus missions are follow-up work. Confirm pacing in a classroom walkthrough.
Answer key: slope −12; intercept 100; residual +2; Q5 profit $120. OLS reference q = 100 − 12p; pilot MSE = 22/7 ≈ 3.14. Default 40-cup capacity and costs give $5 on the 25¢ grid and $120 expected profit. Similar-day reference MSE = 2; rainy-day MSE ≈ 262.33. Bonus: 58.6 views and 53.1°. Exam-style additions: intercept 100; break-even 8 cups/hour at $5; uncapped profit vertex 115/24 ≈ $4.79; rainy residual at $3.75 = −21; 100 views at t ≈ 5.4 h.
Listen for: revenue versus profit; demand versus capacity-limited sales; interpolating versus extrapolating; fitting versus validating versus deciding; SGD batch randomness versus changes in the real world; output temperature versus training controls. Price–sales association in these fictional observational pilots does not prove causation.
Numerical background: updates minimize half the average squared error in centered, scaled price coordinates. The displayed coefficients use original price units. The least-squares line has a unique minimum here. Fresh uniform subsets are sampled independently per update, without repeated rows inside a batch. Compare both updates and pilot observations processed. With a constant learning rate, small batches need not settle exactly at the reference.
Career connections: event planning, business analysis, environmental choices about waste, and communicating a recommendation to a community. Ask whether fixed costs, unpaid labor, affordable access, or reusable supplies would change the decision. Extension themes add digital promotion, exponential functions, and right-triangle trigonometry for a photo composition.
You live in three dimensions: left–right, forward–back, and up–down. But math doesn’t have to stop at three! I want to show you how we can reason about a 4th dimension (and way more) even though none of us can picture it. We’ll start with a tiny bead on a wire, see what a slice shows, what a shadow hides, and what a rotation can’t change. Then we’ll use those same tricks to understand AI models with tons of numbers.
Eight stops. At each one, make a guess, try the experiment, and open “Follow the reasoning” whenever you want to go deeper. Quick disclaimer: these are math spaces and drawings, not a portal to another dimension. (Sorry!)
Jot down your thinking in the box after each experiment. Your notes stay saved in this browser when it allows storage.
Here’s one of my favorite weird facts. Picture a ball with radius 1, and a smaller ball inside it with radius 0.9, like a peach with a thin skin. On a line, the inside part takes up 90% of the length. In a flat disk, it takes up 0.9² = 81% of the area. In a 3D ball, it’s 0.9³ = 72.9% of the volume. See the pattern? So what happens as we keep adding directions?
Make a guess first: how much of the ball is “inside” in 10 dimensions? In 100? Then slide and check. Why does the thin outer skin end up holding more and more of the ball?
Shrinking a ball by 0.9 shrinks it in every direction. With n directions, you multiply by 0.9 once for each one: 0.9 × 0.9 × ⋯ × 0.9 = 0.9ⁿ. We’re comparing two balls of the same dimension, so we don’t even need the full volume formula. Everything else cancels!
In 100 dimensions, the inner 90% of the radius holds only about 0.0027% of the volume. Basically all of the ball is in the skin! Just to be clear, this is a fact about the volume of balls. It doesn’t mean every dataset is spread evenly in a ball or sits right on its edge.
A slice shows you one piece. A shadow throws information away. A net unfolds the outside. But the coordinates always remember the whole object, even when no drawing can.
That’s exactly how AI gets away with it, too. A model can juggle hundreds of features without anyone drawing a hundred-dimensional room. Remember the six-knob smoothie? The error kept improving in directions our 2D map couldn’t even show. The numbers are the real thing; our pictures are just windows we picked.
Pick one experiment. What did its picture show you, what did it hide, and how did the numbers help you check your thinking?
Want to keep exploring? Tesseracts · Hyperspheres · Hypercube counts from Wolfram MathWorld.
You opened a clip about a goat. Somehow it is twenty minutes later, the goat has a sequel, and strangers are arguing about hiking socks. How did “one more” become a whole afternoon?
I want to start with the same bowl idea that explains how AI like ChatGPT learns. Then we’ll untangle three different things: what grabs your attention, what people learn from likes and comments, and what the feed decides to show more of. Rage bait is content designed to make you mad enough to react. And “brain rot” is just slang here, not a medical thing. Silly videos can be fun without being bad for you!
Lower error means the model got better at the job it was given. That doesn’t automatically mean it got better for you.
Eight interactive studios · about 45–55 minutes · just algebra and probability. Every number in the simulations is made up. When I mention real research, there’s a link right there, and I’ll tell you when I’m switching from research to my own analogy.
Jot down your thinking in the box after each experiment. Your notes stay saved in this browser when it allows storage.
Next time you’re about to watch “just one more,” ask yourself: am I actually choosing this, or am I just repeating a choice I already meant to stop making? Sometimes the honest answer is “I’m having fun,” and that totally counts! The goal isn’t to never scroll. It’s to understand the system well enough that you’re the one deciding.
Your response stays in this browser when it allows storage. Nothing gets submitted or graded. This is just for you.
A model can be great at predicting comments without having any idea whether people commented because they loved something or because they were furious. A creator might notice that angry posts get more likes and make more of them, and then the feed shows them to even more people. That’s a bunch of feedback loops feeding each other. It’s not your brain literally rolling down a loss bowl. If I were redesigning the feed, I’d test asking people “Was this worth your time?” and adding optional stopping points, then measure whether people feel satisfied and stop when they meant to, not just how long they watch. Our toy numbers can’t prove what would happen with real people, though. You’d have to test it.
Allow 5 minutes for the opening, 10 minutes for each pair of studios (1–2, 3–4, 5–6, and 7–8), and 5 minutes for the exit discussion. This makes a 50-minute lesson; add 5 minutes for open exploration if time permits. Students need weighted averages, probability, and simple algebra. Softmax, cross-entropy, and sigmoid can remain named computer calculations; the optional explanations provide deeper mathematics.
Invite students to discuss fictional scenarios rather than disclose personal screen-time habits. Ask for a prediction before each preset, then a numerical observation and a limitation. Avoid “all social media is bad,” “dopamine is a pleasure meter,” “brains run SGD,” “ChatGPT is the feed algorithm,” and “every variable reward causes addiction.” The research supports specific mechanisms and contexts, not that entire package.
I hold a Bachelor and Master of Science in Computer Science from Colorado School of Mines. People say I have "golden retriever energy", and I love being physically active. I am an avid weightlifter, trail cyclist, snowboarder, runner, and more. I am now the Founder & CEO of Lune Synth and Coherascent Labs, an education technology and research company. I was a member of the Alpha Tau Omega fraternity as Philanthropy Chair, and I lived in the frat house basement for two years (at the expense of my GPA). I also love to sing, write, and enjoy long conversations with friends and family.