Toaster Regression, Ctd.

Okay, so if you let the toaster cool down in between rounds, it is (more or less) linear. (Contra Dave’s experiment.)

Meyer – Toaster Regression from Dan Meyer on Vimeo.

Here, also, is an array of toast:

Try this:

  1. Equalize the white balance on the toast photos,
  2. Desaturate them,
  3. Blur the heck out of the images,
  4. Sample the center point of each slice, and then
  5. Check the brightness value.

You get, well, rather uninteresting results. Had to scratch that itch, though.

I'm Dan and this is my blog. I'm a former high school math teacher and current head of teaching at Desmos. He / him. More here.


  1. I waited until the toaster was cool to the touch. And, yeah, I wondered about an exponential fit. My color sampling is pretty crude. I’m not sure what to do about it, though.

  2. Isn’t it weird how 1 and 2 have such similar times but different toastedness?

    In other words, 1 is an outlier in one plot but not the other!

  3. Number 1 kills me.

    In the name of experimentation, I almost put my digital thermometer into the slot to gauge the time v. temp. Realized that putting a metal probe into an electric toaster probably wasn’t such a good idea.

    Glad you thought to show what the toast looked like. Now we can really tell how long it took to make the toast for OKGO’s video.

  4. @David Cox
    I thought about doing the same thing with my thermometer and toaster. Mine has a plastic sleeve that would protect me from myself. I was going to get a standard starting temperature to do my own experiment.

    BTW, I was explaining to my family what I was working on, and they think we need to get a life. ;-)

  5. With this research, you could then speculate how long it took to make this eye of toast:
    or create something to figure out how long for any gray scale image to be turned into toast. Then you could add in things like how long does it take to switch the toast, and if you have other people helping, but they switched toast out faster or slower, and then figure out how long it would take. What other factors would effect the amount of time it would take to make the eye of toast?

  6. Dan, great stuff. Granted, your work is very new to me, but the application is immediate and appreciated.

    So, Monday, I think I’ll show this video as an example of a linear equation to my 7th graders. We are just now exploring y=mx + b and happen to have begun a mini project around ‘school life through y=mx + b’ their work so far has been fanstastic!

    The comments and overall progression are a true exemplar of the scientific method and the way I wanted my science classes to look like and feel like at all times.

    Chris – I love what you did with graphing models, and this will help me (at the end of my current y=mx + b mini project) to broaden the scope of understanding with my students who are already determined to understand what to do when something isn’t linear. I thank you kindly.

  7. That’s an analog dial. The times for 1 and 2 are probably meant to be linear but the exact placement of the dial isn’t accurate. I notice that 2 isn’t quite centered in the little window, for example.

    Additionally, for many spring timers, the shortest times have the greatest percent deviation. Once you get beyond a certain point, then the coil spring is better controlled by the modern equivalent of the grasshopper escapement and the timing is much more consistent.

    In the interest of science, Dan should do a series of 1s and 2s and give us the average.

  8. I woke up at 4 am this morning with toasters and toast and outliers swirling around in my head. I couldn’t get David Cox’s nonlinear model and your almost linear model out of my thoughts to fall back asleep. What would cause one data point to not fall in line with eight others.

    Then I thought about what you did differently from David Cox, namely waiting for the toaster to be cool to the touch. What about the first test? Was that on setting 1? Was the toaster ‘cool to the touch’ or was it just as cold as toasters normally are when you decide to toast bread? If it was your first time toasting, perhaps it took longer to warm the coils from ‘cold’ to ‘cool to the touch.’

    I surfed the internet in an attempt to see how toasters worked and found that if your toaster uses a bi-metallic strip then a cold kitchen would make the first piece of toast darker than usual (and probably take longer).” So was the test with setting 1 your first piece of toast? Was the kitchen cold? I suggest you toast some bread, wait for the toaster to be cool to the touch again, and then re-toast on setting 1 (that is, if you aren’t sick of toast already).

  9. Karim: What are you using for your timer?

    Adobe AfterEffects. Sucks, I know. Like using a machete to slice bread.

    Chris: I ran the data through Excel. You can find the graphs on my blog here. It turns out that the linear model is not the best fit.

    It isn’t the best fit if you include the outlying first setting.

    Curmudgeon: In the interest of science, Dan should do a series of 1s and 2s and give us the average.

    Thanks for taking us to school here. I’ll do that.

    Zac: I suggest you toast some bread, wait for the toaster to be cool to the touch again, and then re-toast on setting 1 (that is, if you aren’t sick of toast already).

    I’ll do that too, in parallel with Curmudgeon’s suggestion. Unfortunately, if this works out like y’all think, due to some personal pathologies, I’m probably going to end up reshooting and re-editing all the videos.

  10. So, kinda seems like we are trying REALLY hard to find a linear problem in here (time, temperature, toastiness, deliciousness?).

    When I ran this with my precal students, the most valuable part (from my perspective) was when they were running the various regressions to see which type best (visually) fit, debating why one might work better or not, then seeing how close the higher setting ended up to the various regressions.

    Rather than try and make the toaster fit the line, why not use this problem to talk about using the STAT menu or regression capabilities on excel, etc?

  11. I’m with Sam here. Why are we trying so hard to fit a linear model where one may not belong? If we do fit a linear model where one doesn’t belong then aren’t we guilty of creating pseudo context? Admittedly I don’t really believe this, but if we accept one of the definitions of pseudo context as applying math to a situation where it doesn’t belong, then applying a linear model to a non-linear situation may just qualify.

    Perhaps we should be using this as an example of the math approximating real life and we could have a great discussion on where this is relevant or not. Is “near enough” ok for toast? Is it ok for sending a rocket to the moon?

    If we want to be teaching “real” math then we need to be teaching real math, warts and all.

  12. Sam, echoed by Numbat: So, kinda seems like we are trying REALLY hard to find a linear problem in here (time, temperature, toastiness, deliciousness?).

    Doesn’t matter to me one way or the other if it’s linear or exponential or quadratic or none of the above. I want assurances, though, that if the toaster can’t be modeled nicely, it wasn’t because my data collection was flawed. I demonstrated that Dave’s data would have been better if he had let the toaster cool down each time. Both Zac and Curmudgeon have presented strong evidence that I could gather better data also. If, at that point, I’m still frothing about linear fits, you’ll both have a good point.

  13. If I play around with this in a mental experiment …

    Since the electric resistance of the elements is constant, variables probably include the voltage of the household circuit, the air movement around the toaster, the humidity of the slices, and the shape and thickness of the bread.

    If we can control for those variables, I’m expecting a linear relationship for the browning phase (constant energy transfer); non-linear for the initial phase of warm-up because the BMStrip starts closer to the temperature of the elements, i.e., dT=0; and non-linear in the final phases of burning more or less, because the burning point of bread is a set point, lower than the ultimate shutoff point. The toaster manufacturer must guess at the composition of the bread and try to determine the length of time that works best to burn just enough of the toast to keep people happy.

    This comes out like a logistics curve when viewed in it’s totality but I think that the toaster manufacturer would desire a linear trendline over the settings allowed because it would be much more understandable to the general public — math teachers and data-geeks be damned.

    “1” should be “lightly toasted.”
    “8” should be “very toasted.”
    Everything else spread neatly in between.

    My point about the numbers and the exact settings in the data collection was made in that light, not because I think the data was flawed.

  14. I like the linear fit. Or maybe linear with the outlier removed.

    I don’t think the better fit justifies a more complex model like quadratic. After all, a degree 9 polynomial could fit perfectly.

  15. Also:

    Dan: what sort of regression is this? Your line seems to have a larger slope than I would. Ignoring the outlier at 1, you are are underpredicting the small ones and overpredicting the large ones.

    The outlier and reversion toward the mean should both make the slope even shallower than what we see in the rest of the data.

  16. “You get, well, rather uninteresting results.”

    Uninteresting?! I’m shocked at how flawlessly piecewise-linear the setting vs. brightness graph looks! I wouldn’t expect the literal darkness of the toast to be related in such a simple way to the toaster setting. And what’s going on at setting six? Is the slope change an artifact of the processing method? A manifestation of some deep food-chemistry principle?

  17. @Aaron F.

    The only “deep food-chemistry principle” I can think of is the Maillard reaction. This is the reaction that causes meat to sear, and bread to turn into toast. Apparently this is reaction combines the outer layer of carbohydrates and protein, creating the “golden brown and delicious” crusty goodness we know and love. Your question intrigued me enough to hop online and see what I could find about it. I discovered this gem on Wikipedia:

    “The rate of Maillard reactions increases as the water activity increases, reaching a maximum at water activities in the range of 0.6 to 0.7. However, as the Maillard reaction produces water, further increases in water activity may inhibit Maillard reactions.”

    Could this be the cause of the change in the graph? I don’t know, but it sounds good.

  18. I wouldn’t be so down on the results in the brightness value section. This part shows students an analog to digital process and is sure to bring in visual learners, as well as those students who like using graphics software. (I’m guessing there is plenty of overlap in those groups.)

    Thanks for the idea.

  19. @Sam and Numbat

    My middle school students had immediate concerns regarding the non-linear nature of the line. Their collective conversation mirrors the conversation here and on a few other blogs.

    Some were not bothered with the flaws, some wanted to draw trend lines (not by name as they don’t know much about them yet) and still others, most others had complaints as to the flawed nature of the work. Ha!

    Their complaints started at the beginning where the time that the toast was reported. Some felt it to be inaccurate in respect to their own observations. Finally, their complaints ended with the questions talked about on this blog regarding heat and regularity of practice in the experiment.

    Never the less, they became rather good at working with y=mx+b during the process. The test results from this unit showed that it was the highest tested set of skills among the rest from the same unit. The inquiry, I hope, helped attach this learning in a solid location in their minds. my blog has a little bit of evidence of their work on it.

  20. Bad news, buds. I just toasted eight slices on the first setting. I threw out the first slice owing to curmudgeon’s concerns and averaged up the rest, which came to two seconds less time than I had originally reported. Which doesn’t change the fit appreciably. (The standard deviation was .38 seconds if anybody’s interested.)