# How to use Statistics to Figure out Maximum Calories?

November 9, 2008 12:34 PM Subscribe

I've recorded my weight and the number of calories I've eaten each day for the past 6 months. I want to use to data to figure out the maximum number of calories I can eat each day without gaining weight. Any ideas on how to do this with statistics?

I run into problems because my calorie counting is somewhat inexact, I'm probably only accurate to +/- 200 on a given day. Also there is temporary weight gain and loss due to water and sodium intake which needs to be ignored somehow. I also missed a few days here and there which I need to figure out how to handle.

Let me know if it would help to see the data. I can send it to you.

I run into problems because my calorie counting is somewhat inexact, I'm probably only accurate to +/- 200 on a given day. Also there is temporary weight gain and loss due to water and sodium intake which needs to be ignored somehow. I also missed a few days here and there which I need to figure out how to handle.

Let me know if it would help to see the data. I can send it to you.

There's latency in weight gain. The excess calories you eat today don't become excess weight for several days.

posted by Class Goat at 12:49 PM on November 9, 2008

posted by Class Goat at 12:49 PM on November 9, 2008

@modernnomad; I forgot to mention I also tracked my exercise calories burned each day. So that will make it more accurate.

So I have a dataset, calories eaten - calories burned through exercise, and my daily weight.

posted by GregX3 at 12:51 PM on November 9, 2008

So I have a dataset, calories eaten - calories burned through exercise, and my daily weight.

posted by GregX3 at 12:51 PM on November 9, 2008

There are tons of spreadsheet templates available for free with The Hacker's Diet. Have you checked that out?

posted by Science! at 12:52 PM on November 9, 2008

posted by Science! at 12:52 PM on November 9, 2008

a) Read The Hacker's Diet, specifically the section on moving averages.

Maintaining one's weight is simply a matter of NOT IGNORING WHAT THE SCALE IS TELLING YOU, on a DAILY basis.

However, fluctuations introduce significant noise into daily reading, which is why only looking at the moving average is useful.

To calculate the today's moving average:

Today's MA = (0.75 x Yesterday's MA) + (0.25 x Today's weight on the scale)

That's it! You can adjust the scaling factors (eg. 0.8 & 0.2), but shouldn't need to.

Then when your daily MA gets above a threshhold, or starts moving in the wrong direction, you need to start eating less & exercising more.

posted by troy at 12:53 PM on November 9, 2008

Maintaining one's weight is simply a matter of NOT IGNORING WHAT THE SCALE IS TELLING YOU, on a DAILY basis.

However, fluctuations introduce significant noise into daily reading, which is why only looking at the moving average is useful.

To calculate the today's moving average:

Today's MA = (0.75 x Yesterday's MA) + (0.25 x Today's weight on the scale)

That's it! You can adjust the scaling factors (eg. 0.8 & 0.2), but shouldn't need to.

Then when your daily MA gets above a threshhold, or starts moving in the wrong direction, you need to start eating less & exercising more.

posted by troy at 12:53 PM on November 9, 2008

*The excess calories you eat today don't become excess weight for several days.*

that's an interesting assertion; you mean newly-created fatty acids weigh more than the ingested food they were derived from?

Since fat has a high water content I guess this is possible but I'm not entirely believin' it.

posted by troy at 12:56 PM on November 9, 2008

The first thing I'd do is verify that the two variables are dependent. Make a scatterplot of calories eaten vs weight change the following day, then fit a linear regression line to it (most spreadsheet software will do this). Is there a clear correlation?

If the data is too fine, some sort of moving average within a window might give you a cleaner looking graph:

avg calories for MTW vs avg weight change on TWH

avg calories for TWH vs avg weight change on WHF

etc

If the data don't appear to be correlated (your line doesn't fit the data well), it tells you that your calorie intake alone is not a good predictor of your weight change. Thus there are probably other variables, like calories burned, that account for a goodly proportion of your weight change, and you're probably not going to be able to make any useful inferences from that data alone.

If, on the other hand, you find that your line fits the data fairly well, you can use that line as a rough predictor. Where does it cross the axis? In other words, how many calories did you consume when your weight change was zero? That's how many you should shoot for.

posted by chrisamiller at 1:02 PM on November 9, 2008 [1 favorite]

If the data is too fine, some sort of moving average within a window might give you a cleaner looking graph:

avg calories for MTW vs avg weight change on TWH

avg calories for TWH vs avg weight change on WHF

etc

If the data don't appear to be correlated (your line doesn't fit the data well), it tells you that your calorie intake alone is not a good predictor of your weight change. Thus there are probably other variables, like calories burned, that account for a goodly proportion of your weight change, and you're probably not going to be able to make any useful inferences from that data alone.

If, on the other hand, you find that your line fits the data fairly well, you can use that line as a rough predictor. Where does it cross the axis? In other words, how many calories did you consume when your weight change was zero? That's how many you should shoot for.

posted by chrisamiller at 1:02 PM on November 9, 2008 [1 favorite]

Arthur DeVany can sound a little crazy sometimes, but I was persuaded by his paper Why We Get Fat. It would seem to advocate that doing what you are doing is not necessarily the best way to go about it. I say this as someone who tried to track weight with calories per day and found some oddities in my weight gain / calorie consumption.

posted by geoff. at 1:07 PM on November 9, 2008

posted by geoff. at 1:07 PM on November 9, 2008

*I forgot to mention I also tracked my exercise calories burned each day. So that will make it more accurate.*

Well, maybe, but you have to remember that the vast, vast amount of calories you burn aren't burned in the gym. Say running for a half-hour burns something in the neighborhood of 300 calories. If you're stable at 2000 calories, then 1700 calories are being burned by everything else you do.

To really be accurate, you'd have to account for how much walking you did while at the grocery store, whether you played soccer on the weekend, and even things like temperature, which alter your metabolic level.

Why don't you throw the data up as a google spreadsheet and share it? I'll spend a few minutes taking a crack at it.

posted by chrisamiller at 1:08 PM on November 9, 2008

Honestly, it seems to me like there is one missing variable -- how many calories a day does your body burn right now? The answer might surprise you. I was convinced I had a slow metabolism until I did a RMR (resting metabolic rate) analysis and learned that I actually have a really high metabolism and was not eating ENOUGH.

posted by mynameisluka at 1:25 PM on November 9, 2008

posted by mynameisluka at 1:25 PM on November 9, 2008

You may want to try PhysicsDiet... they've already done a lot of the legwork you're trying to accomplish (running averages, calories, etc).

posted by crapmatic at 2:25 PM on November 9, 2008

posted by crapmatic at 2:25 PM on November 9, 2008

Wow, that's a serious amount of data!

But basically we're working on the calories in = exercise + metabolism + weightgain.

So, open yourself an excel spreadsheet. Dates go in column A, fill in your calories eaten in column B, and the amount of calories you used whilst exercising in column C. For the days you've missed, guess, or you can average column B by using =AVERAGE(B1:Bxx), and put that for the ones you missed. It isn't going to make a huge difference, but you do need data for each day.

Then, add up the totals of both columns using =SUM(B1:Bxx) and =SUM(C1:Cxx), i.e you now have two numbers, the total amount of food calories (F), and the total amount of calories used during exercise (E). (you can do this using a calculator, obviously, but you're pretty likely to make a mistake and have to start again)

Now, have you lost any weight? Take the amount of weight you've lost in pounds and multiply that by 3500. This is the amount of calories that would have been stored in the weight you lost (W).

Then, add the weightloss calories to the total food calories and subtract the total exercise calories. Now divide this number by the number of days, and this is the amount of calories you burn each day just by living. ie = (W + F - E)/days

HOWEVER, if you have lost a lot of weight or greatly increased the amount of exercise you've done over the six months, then you metabolism will have changed. I would only use the last month or two of data.

If I haven't explained this well enough, then I'm happy to do it for you.

posted by kjs4 at 7:05 PM on November 9, 2008 [1 favorite]

But basically we're working on the calories in = exercise + metabolism + weightgain.

So, open yourself an excel spreadsheet. Dates go in column A, fill in your calories eaten in column B, and the amount of calories you used whilst exercising in column C. For the days you've missed, guess, or you can average column B by using =AVERAGE(B1:Bxx), and put that for the ones you missed. It isn't going to make a huge difference, but you do need data for each day.

Then, add up the totals of both columns using =SUM(B1:Bxx) and =SUM(C1:Cxx), i.e you now have two numbers, the total amount of food calories (F), and the total amount of calories used during exercise (E). (you can do this using a calculator, obviously, but you're pretty likely to make a mistake and have to start again)

Now, have you lost any weight? Take the amount of weight you've lost in pounds and multiply that by 3500. This is the amount of calories that would have been stored in the weight you lost (W).

Then, add the weightloss calories to the total food calories and subtract the total exercise calories. Now divide this number by the number of days, and this is the amount of calories you burn each day just by living. ie = (W + F - E)/days

HOWEVER, if you have lost a lot of weight or greatly increased the amount of exercise you've done over the six months, then you metabolism will have changed. I would only use the last month or two of data.

If I haven't explained this well enough, then I'm happy to do it for you.

posted by kjs4 at 7:05 PM on November 9, 2008 [1 favorite]

This thread is closed to new comments.

I suppose an unscientific method of figuring out your maximum intake without weight is simply to increase the amount you eat every day until you notice your weight trending up, which should be easy to do if you are recording your weight every day.

posted by modernnomad at 12:45 PM on November 9, 2008