Previous post

The Problems with Computer Models (Part 1)

Dr. Katharine Hayhoe (@KHayhoe on Twitter) repeatedly pointed out in a recent excellent Infrastructure and Climate Network webinar (1), that climate models can’t predict what will happen on a particular day in the future. Well, living here in Pittsburgh, where the weather forecast for much of this summer was “Possibility of sunshine, clouds, rain and severe storms,” there’s no surprise that a climate model can’t predict the weather next year. (2) But why do these models fail?

Years ago, I created a simple computer model for weight loss. By looking at that model, you’ll see what that model could and couldn’t do–and why.

Let’s do a science!

First, some basic science:

You know the Continuity Equation, but you may not know that you know it, at least if you understand your checking account. Let’s say you have $347 in your checking account. You get paid $500 and you write a check for your new 64 Gb iPhone 5s for $399. (3). What’s in your account plus what comes into your account minus what leaves your account is what’s left in your account. $347+$500-$399=$448.

That’s the Continuity Equation:

What you start with plus what goes in minus what goes out is what you’re left with.

That equation is amazingly useful. It describes your bank account (or at least it should–if it doesn’t call your bank!). It describes your car. It describes global warming. It describes the universe. It describes you. In science, if it’s made of matter and/or energy, you can use the Continuity Equation to describe how much of it there is. (4)

Your weight is based on your current weight plus what you take in (food and water, air) minus what you…eliminate.

Sorry if I’ve gone all fanboy about the Continuity Equation, but once you know to look for it, it’s so useful! You find yourself asking “How does teeny Bruce Banner turn into the Incredible Hulk?” “Do you realize how much energy Iron Man’s Arc reactor is producing to enable him to fly?” “How many feet of webbing can Spider-man realistically shoot from his web-shooters? If he’s got organic web-shooters, do you realize how much weight he must lose?” (5)

Next, some basic biology:

Dieticians estimate your resting caloric needs by multiplying your weight in pounds by 11. (6) If you weigh 220 lbs. and eat 11*220=2420 calories and do nothing all day, you won’t gain weight. If you want to account for actually doing something during the day (work, exercise, making snide remarks on Twitter, etc.), you’ll need to bump up the constant to 12, 13, or so on. When I was a paramedic, 15 worked pretty well. As a Director of Communications working at a desk all day, I had to use 13.5. I counted exercise separately and averaged my current workouts.

Right there, you can see some big problems with our model.

How do you know whether to make the constant 11, 11.5, 23, or something in between? Well, if you’ve been on enough diets (7) and you exercise about the same and keep track of your caloric intake and weight, you can come up with a decent number for this. If your daily exercise program changes, you’ll want to estimate your daily calories not including exercise and then add in the exercise calories. Most smartphone exercise tracking programs and heart rate monitors will estimate your calories burned exercising for you. But your exercise program should vary day-to-day in intensity. You might ramp up your exercise program or get injured and cut back or stop exercising. Your computer model won’t be able to accurately predict what will happen. There’s also a sarcastic saying in biology that “Variables don’t; constants aren’t.” Your body’s metabolic rate can change for a lot of reasons. If you get sick, you might need more energy. If you don’t eat enough calories, your body can go into a more efficient “starvation mode” that can dramatically drop your constant. (8) Your computer model has no way to account for this. You’ll be able to get the average right, but predicting what day you’ll weigh 200 lbs. (if you started at 220) will be impossible. Natural variability (the random things that happen) will prevent you from an exact prediction.

In the same way, you’re assuming that your caloric intake will be exactly the same every day. Maybe you go to that new fast food chain, “Diet Disaster,” for lunch. Maybe you worked so hard at work that you forgot to eat. (9) Maybe you eyeball portions instead of carrying around a measuring cup and scale wherever you go. And don’t get me started on the accuracy of food labels. The estimates average out (and get compensated for by the constant estimate you made above), but once again, natural variability will prevent you from getting an exact weight on an exact day.

Let’s look at one last problem. You remember that the Continuity Equation says that your weight is your current weight plus what you take in minus what you eliminate?

Just how accurate do you want your model to be? Unless you’ve got one of those fancy toilets that monitors the mass of what you “give off” each day, you have to ask “How accurate do you want your model to be?” My guess is you’ll give up some accuracy for convenience. A computer model may be inaccurate because of an inability to obtain data–or an unwillingness to obtain data. We can throw in an average and it will be close enough, but your computer model will once again fail to give you an exact reading on a particular day because of natural variability.

That’s it for today. Tomorrow, we’ll solve a differential equation! Don’t worry, it’s a simple equation and I’ll solve it for you. (10)

  1. “High-resolution climate projectioncs: Where do they come from and what can we do with them?”–by Dr. Katharine Hayhoe on September 18, 2013 []
  2. It’s possible all the weather forecasters went on vacation at the same time and put up a generic forecast that would cover any situation. I can’t rule that out. []
  3. I’m jealous. They were out. []
  4. There are some adjustments when General Relativity becomes significant, and quantum mechanics can pull a fast one, but only for a short-enough period of time that it doesn’t count. []
  5. So…I’m a nerd. I’m doing a science blog here. You shouldn’t be surprised. []
  6. Sorry, I can’t footnote this, either. I learned this trick in the late 1980s. If you want a better estimate, see “Modeling weight loss with differential equations,” where the author uses a more sophisticated method of estimating daily caloric needs. []
  7. Sigh []
  8. Note this well: if you cut your calories too much, you might not gain weight. The usual estimate dieticians use (and no, I can’t footnote this, either) is that your caloric intake should be above 1500 calories a day and you should only short yourself a maximum of 500 calories a day (a thousand at the absolute outside). If you weigh less than 125 lbs. (1500/12), you need to exercise to lose weight on 1500 calories a day. []
  9. OK, you’re on a diet. No one forgets to eat when on a diet–but it could theoretically happen. []
  10. For the record, it’s the only differential equation I’ve solved since my last class in numerical methods for partial differential equations–and I’ve designed, modeled and flown high power model rockets. Yes, I’m thankful for software packages that I can buy off-the-shelf! []

Written by Rob Carr


Website: http://www.unspace.net

Read previous post:
What’s Come Before

Back in 2004, I started a small Blogspot blog called UnSpace. The blog was about whatever I happened to be...

Close