Showing posts with label fuel economy. Show all posts
Showing posts with label fuel economy. Show all posts

Saturday, February 21, 2009

What "mean" means

Dear Dr. Math,
My parents live about 200 miles away from me, so I make the drive back and forth a lot, with no stops. Almost exactly halfway in between the speed limit changes, so instead of driving 55 mph I drive 80 mph. Since my average speed is 67.5 mph, shouldn't it take me 200/67.5 = 2
.96 hours to get there? I've noticed it always takes a little longer, but I don't get it. I've even set the cruise control and kept the speeds exactly constant.
Chuck

Dear Chuck,

I'm going to go ahead and assume that you live in one of those places in Utah or west Texas where the speed limit actually is 80 mph. Otherwise, you've been speeding, and I can't endorse that kind of behavior. OK? OK. Don't make me write a post about the correlation between speeding and traffic fatalities. I swear I will turn this blog around.

Here's why your numbers didn't add up: while it's true that the average, in the sense of arithmetic mean, of 55 and 80 is mph, that's actually the wrong kind of average to be using in this circumstance. "Kinds of averages?" Oh yes. Allow me to explain:

In the course of your trip, you drive half the distance, 100 miles, at 55 mph. So that leg takes you hours. On the second half, you're going the legal speed limit of 80 mph, so that half should take you hours. Altogether, then, your driving time is 1.81 + 1.25 = 3.06 hours, a little more than you expected.

Rather than the arithmetic mean here, you should have been calculating your harmonic mean, which for two numbers A and B is defined as . To see why that's the right quantity, let's denote by S your real average speed for the trip, that is, the total distance you traveled divided by your total time. If T is the total time you spent driving, then ; equivalently, . If A is the speed you went for the first half and B is the speed for the second half, then another way you could calculate the total time is as , just like we did previously. As usual, in math when we compute the same thing two different ways we end up with an interesting equation. In this case, since the times are equal, we get:
.
Dividing through by 100 on both sides gives us

which, if you take reciprocals of both sides and multiply by 2, yields the formula for the harmonic mean. In this particular example, mph, so your guess of 67.5 mph was only off by a little bit.

So, when is the arithmetic mean the right one? If you had gone on a trip and spent an equal amount of time driving 55 mph and 80 mph, then your average speed would be the arithmetic mean of the two. To see that, let's just assume you drove 1 hour at each speed. Thus, your total distance traveled would be miles, and your total time is 2 hours, so the average speed is mph. VoilĂ ! If you look at that calculation closely, you can pretty clearly see why it should always give you the arithmetic mean--you're just adding the two speeds together and dividing by 2. Similarly, another way to see that the arithmetic mean is inappropriate for the equal distance problem is to notice that by driving the same distance at each speed, you spend more time at the slower speed and less time at the faster one.

There's actually yet another kind of mean, called the geometric mean, which shows up when you're computing ratios, percents, interest rates, and other things that are typically multiplied together. For two numbers A and B, it's defined as . For example, let's say you were a rabbit farmer and your population of rabbits grew by 50% one year and only 10% the next. The combined effect at the end of two years would be that the population had increased by a factor of , for an increase of 65%. To achieve that same growth at a constant rate, say a factor of R for each year, you'd need , so . So in a sense the "average" growth rate was 28% per year. Many people in this kind of situation would be tempted to guess that the average was 30%, splitting the difference between 50% and 10%. You can see that it's not far off from the truth, but it's not quite right. And why be almost right when you can be exactly right?

The point of all these means is to replace the net effect of two different values with the effect of just a single value repeated. But you have to be careful to consider exactly how those quantities are interacting to produce that combined effect. When they simply add together, the relevant type of mean is the arithmetic one, when they multiply, the correct mean is geometric, and when they do that weird thing of combining via their reciprocals, you use the harmonic mean. Interestingly enough, for any two numbers, if M is their arithmetic mean, G is the geometric mean,and H is the harmonic mean, it's always the case that . In fact, there are other means, too, but these three are the major players.

Other situations where the harmonic mean might come up include: calculating average fuel economy of a car given an equal amount of city and highway driving, computing the total length of time it takes two people working together to complete a task, figuring out the net resistance of two electrical resistors in parallel, finding a pleasant harmonic note (hence the name) between two other musical notes, calculating the height of the intersection between two crossed wires, and answering questions about the uses of the harmonic mean!

-DrM

Tuesday, October 7, 2008

Rods to the Hogshead


Dear Doctor Math,
Should I buy a Prius or a Honda Civic? At the Toyota dealership they told me the Prius pays for itself in gas savings, but I don't trust them.
Thanks,
Deke


Well, Deke, it's good to be skeptical. But let's see if we can crunch the numbers and settle this for ourselves without having to trust a car salesman to figure it out for us.

First, we'll have to make some assumptions about the costs of the various things in question and the ways that you're planning to use your car, whichever one you get. All of the numbers I'm about to quote came from the EPA's fuel economy website. Now, I don't know anything about you, but I'll go ahead and assume you drive about 15,000 miles per year, like the average American does. (Someday I'll write about the difference between "average" and "typical," but we'll table that discussion for now.) Of that 15,000 miles, I'll assume that approximately 55% is "city" driving and the other 45% is "highway," again in keeping with the average. So that works out to 8,250 miles in the city and 6,750 miles on the highway. If you're involved in a lot of cannonball runs, you can adjust accordingly.

According to the EPA's latest numbers, the 2009 Honda Civic gets 25 miles per gallon in the city, 36 highway. So, every year you would use 8,250/25, or 330, gallons of gas in city driving and 6,750/36, or 187.5, gallons on the highway. You total volume of gas used per year in the Civic would be 330 + 187.5, or 517.5 gallons.

Due to its greater efficiency in stop-and-go traffic, the Toyota Prius gets 48 miles per gallon in the city and 45 on the highway. Therefore, the total amount it guzzles per year is 8,250/48 + 6,750/46, or 321.8 gallons.

Now, gas prices are hard to predict, but let's guess that over the lifespan of your car, gas will cost an average of $4.00 per gallon (in 2008 dollars). That seems like a reasonable projection given the way prices have historically risen. So that works out to 517.5*4, or $2,070, per year for the Civic and 321.8*4, or $1,287, for the Prius. Every year, that means you save $783 by driving the Prius.

According to the manufacturers, the suggested retail price for the Civic is $16,205; for the Prius it's $22,000. These prices assume a basic package; probably, any extras you might want, like ground effects or those things that make it jump up and down, would cost about as much for either car. The difference in price, therefore, is $5,795, which would take 5,795/783, or about 7.4, years to pay off in gas savings. Of course, if gas goes up even more, say to $5 per gallon, that number would come down to as little as 6 years.

Either way, it seems like a fairly long time, but not outside the realm of possibility. I couldn't find any good numbers here, but people I know who own cars seem to get a new one about every 5 years. Maybe you hold to your cars a little longer, Deke, or maybe there might be other things about driving a Prius that appeal to you, I don't know. But strictly in terms of the gas savings, it doesn't seem to quite be worth it, although it's close. The market seems to have done a pretty good job sorting out these relative prices.

An interesting side-note here is that the marginal gas savings (that is, the money saved per every additional mpg) go down as the cars get more efficient. For example, doing the same calculation as before, we can see that an SUV that gets 10 miles per gallon costs $1,000 more per year in gas than one that gets 12 miles per gallon. So, the more important choices may not be between pretty good and very good, but between bad and very-slightly-less-bad.

-DrM