Showing posts with label Mathematics. Show all posts
Showing posts with label Mathematics. Show all posts

Tuesday, August 20, 2019

Some Silly Statistics

Over at the BBC, I ran across something really silly: a climate change food calculator.

According to the calculator if I drink a glass of milk a day (defined as 200 ml/day), it says that it is the equivalent of driving a car 941 km and that it uses an astounding 45,733 liters of water and 652 meters square of land.

What if I drink 2 glasses of milk a day? According to the calculator that is the same as driving a car 1883 km and uses 91,466 liters of water and 1303 square meters of land. Basically twice as much of everything.

It sounds tremendously wasteful.

On second thought, however, can that possibly be right?

At 200 ml of milk per day over 365 days in a year, someone who drinks a glass of milk a day drinks 73 liters of milk a year, which means that it takes 626.5 liters of water to produce 1 liter of milk. That sounds terribly inefficient. According to the calculator, that is the same as taking almost 4 showers per day.

Something seems funny with that number. Does a cow really take 626.5 gallons of water to produce a gallon of milk? The average dairy cow produces 8 gallons of milk per day. According to the BBC, each cow must drink 5,012 gallons of water a day. Can that possibly be right? According to the agriculturalists at the University of Nebraska, the average cow drinks between 3 to 30 gallons of water per day. Assuming the worst case scenario, the BBC has cows drinking 167 times as much as the University of Nebraska.

Another problem is the scaling. The average dairy cow produces far more milk each day than I can drink, even if I am on a milk only diet. So how many cows does it take to supply my one glass of milk a day? One. How many cows does it take to supply my milk drinking if I drink two glasses a day? One. How many cows are required to provide my milk if I drink one glass a month? One. That cow also needs to eat and drink the same amount whether I drink one glass a month or two glasses a day. The results (at my level of consumption) are the same regardless of my level of consumption. Not only is the idea that it takes 45,733 liters of water to produce a glass of milk a day ridiculous, but the notion that 91,466 liters of water to drink two glasses a day is even more absurd. And the only way to get the cow to stop consuming water is to kill it. What does the BBC have against cows?

That seems like an outrageous question, but in fact it is not.

Consider what happens if, instead of plugging in milk into the calculator, we plug in the alleged beverage of choice for Britons: tea. According to the BBC calculator, a cup of tea a day for a year (about the same amount as milk) in the equivalent of driving a care 63 miles. Doesn't that sound oh so much more virtuous. But how much water will it use? The BBC calculator suppresses that information. They will tell you that having a pint of beer a day (double the amount of tea or milk) will use 3,535 liters of water per year. A really thirsty cow would actually only drink 547.5 liters of water per year to produce that much milk. So milk would seem to be a more efficient use of water than beer, but since they are not accurate in describing milk why should we assume that they are more accurate in describing beer?

Which brings us back to the question, what does the BBC have against cows? On their page they said that they put together their calculator because they claim that "the West's high consumption of meat and dairy is fuelling global warming." So is their solution that we should just kill all the cows and let the carcasses rot without eating the meat? Somehow that does not strike me as being good for the environment.

Wednesday, June 8, 2016

Some Perils of Mathematical Modeling

Mathematical models can be great. They do, however, have some limitations. Suppose, for example, that you are trying to predict some data that you suspect has some mathematical relationship and you want to know the future behavior. A mathematical model might be useful to predict the future results of the data. Your predictive abilities will only be as good as the model (or formula) that you are using. Presumably, if your model accounts for past data, it should work for future data as well. We'll keep this fairly simple.

Lets say that you start with an initial condition and it starts at zero. The next data point to come out is a one. So at x = 0, y = 0 and x=1, y=1. This gives us a nice formula: x = y. We are ready to predict the future. Our guess is that when x = 2, y =2. Our graph of the function looks like this:


This provides nice steady increase. If it is a graph of your investments, you will not be getting rich very quick, but you might not be getting poor either. If it is global temperatures, it might cause some concern. If it is crop yields per square meter, then it is steady and predictable.

But when x =2 comes out, it turns out that y = 0. Our prediction was off by 2. Our graph comparing our prediction with actual results looks like this:


This looks like a simple problem to fix. We simply change our equation to y = -x^2 + 2x. This equation also works for the first three values. Our graph comparing our prediction with actual results now looks like this:


Those curves are pretty close. We seem to be on the right track. Let's expand our prediction graph and predict what is going to happen in the future:


We predict that the next point on the graph will be -3. It looks as though the graph is going increasingly downward. If this is your return on investment, then it looks like you better get out of the market now. If this is global temperatures, then stock up on winter clothes.

In fact, the next point is -1. Again, we are off by 2. Out graph comparing our prediction with actual results looks like this:


This is a not so easy fix. We change our equation to y = (x^3)/3 - 2x^2 + 8x/3. This gives us the following graph:


This is not exact but it is close. If we look down the road, we can predict the following:


So if this is our investments, we should just ride it out because things look better down the road. If it is global temperatures, then hang on because things will get a lot hotter really quick.

When the next number comes in, it comes in as 0, exactly as our model predicted:


Surely, we are on the right track.

The next number, however, comes in as 1 rather then the 5 our model predicted.


Something is wrong again. If we look at our various model graphs, we can see that they end up going all over the place:


Clearly, while each of these graphs works for a bit, they all fail in the end. They all end up flying off on a tangent. This is even more clear when we look at the long term trajectories:


All of these graphs were based on the actual data, but they differ markedly in their projections (all of which turn out to be wrong in the long term). Remember that the extreme models accounted for almost the same range of data, but after a point made widely divergent predictions.

So, one take away is that the models, at some point, break down. We could make the models much more complicated and account for the first twenty points but they would then still go wildly wrong. The general point would remain. If you are looking at a fluctuating phenomenon and suddenly your model becomes monotonically increasing or decreasing (that is, it stops fluctuating) then that is the point where your model probably has broken down.

Wednesday, October 8, 2014

Math is Hard: Grade School Edition

This is an article explaining why parents should not be upset with the new common core making the math more complicated. The common core is just trying to help the children understand how math works in a better way.
It's reasonable that parents will be confused by the new way of doing things, says Meyer, the former math teacher and Ph.D. student. But he says that parents' education wasn't particularly effective, even if they're confident in their arithmetic.
But that is why the common core is largely not going to work. If the parents' math education wasn't particularly effective, it is the same math education that the teachers had. So if the parents are confused can we expect the teachers to do any better?

Those who understand and are good at math usually end up majoring in something like physics, math or engineering, not math education. Usually the math education majors are not the same caliber as the math majors. But from the examples I have seen of common core math problems, the math education majors should be able to handle them.

The problem is that math education majors are often shooting for jobs as high school math teachers and the common core has to be taught in grade school as well. Grade school math teachers teach everything else as well and they come from elementary education majors. Unfortunately education majors tend to come from the bottom half of college students and tend to score particularly poorly on math. The mean SAT scores in math for education majors are below the mean scores for those majoring in things like English, theology, acting, trucking, and journalism (none of which are noted for math ability).

Before the common core, I ran into otherwise good elementary school teachers who did not understand math well. Trying to get these teachers to teach tricky ways of dealing with math problems seems to me to be a recipe for disaster.

I am in favor of better math education. I am in favor of children understanding math better. I am dubious that trying to get people who do not understand math well in the first place to teach unusual approaches to basic problems is the best way to do it.

Monday, January 27, 2014

Math is Hard

James Taranto of the Wall Street Journal often uses the line "Math is Hard" to point out basic mathematical errors in news stories. The video in this post and the post associated with it demonstrate how all kinds of idiocy can come from people who know a little math. The video purports to show that:
1 + 2 + 3 + 4 + 5 + 6 + . . . = -1/12
Even common sense will correctly tell one that is wrong.

Basically for any series
1 + 2 + 3 + 4 + 5 + . . . + n = n(n+1)/2
Solving this problem was what tipped Gauss's teachers that he was good at math. (Not that he was the first to solve it, but that he figured it out at a young age and so got special tutoring in mathematics.)

The limit of this series as n approaches infinity is not going to converge on -1/12 no matter what crazy proof they talk about in the video. One cannot legitimately treat the various series the way that they do in the video.

Only if one converts the series into a function (and they are not really the same thing) could one argue that the resultant quadratic equation could be solved to show that it equals a particular pair of irrational numbers plugged into the formula could come out with an answer of -1/12. Since they are not integers, however, they do not work for the actual series. There is no valid way for anything in the series to equal -1/12.

Math may be hard but it certainly not that hard.

Thursday, November 14, 2013

Who Lives Longer?

In the first book of Herodotus, Herodotus tells the story of Solon visiting Croesus and figuring out how many days a seventy-year old lives. For us that is 365 x 70 = 25550 with an additional 17 days every fourth year for leap years. For the Greeks, however, there are not leap years but leap months which are added every other year.

Given twelve months of thirty days in a typical Greek year, how many days does Solon think a 70 year old lives for? Would you rather live to be seventy years old as an ancient Greek or a modern one?