Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Thursday, July 4, 2013

Harmonic Mean

In mathematics there are several ways to take the mean (average) value.
The most well known is the arithmetic mean, which is the just average we usually think about.
But today I would like to mention about "Harmonic Mean".
Harmonic Mean of two numbers X and Y is

2/(1/X   +  1/Y)

I come up with an instance to use harmonic mean.
Suppose I live at the foot of a hill, my office is at the top of the hill, and
I drive a roundtrip between my home and my office.
Furthermore, suppose my MPG( millage per gallon) is 10 for upward and 40 for downward for sake of simplicity.
Then my MPG for the round trip must be computed as follow:
MPG = # miles driven/ # gallon consumed.
Let D be the # miles in one way.
So #miles driven for the round trip is 2D

then #gallon for up should be D/10, and
       #gallon for down should be D/40.
So  # gallon consumed for the round trip is the sum D/10 + D/40.

Hence, MPG = (2D) / (D/10 +D/40)

                     = 2/(1/10 + 1/40) = 80/5 = 16 mpg.

Notice that the distance D is irrelevant to find the average fuel consumption for the round trip.
The blue part (obtained from above line by dividing top and bottom of the expression by D.)
is exactly the harmonic mean of 10 and 40. So in this sense 16 is the average mpg of 10 and 40.

Now I want to improve my overall mpg by driving mildly.
Which strategy  works better?
1. Improve only my uphill consumption rate from 10mpg to 20mpg.
2. Improve only my down consumption rate from 40mpg to 80mpg.

The first strategy will result to 26.666 mpg, pretty good.
But....
the second strategy will result to 17.777 mpg......Not much change!

Here is the lesson.
To improve the harmonic mean, one should consider improving the lower value.
Improving the lowest performer will result a better overall performance.
Help the most struggling worker will do better than help the talented one to go further.
Isn't it Harmonic??
Anyway, in reality, my commuting route has lots of short sloped roads, disgusting traffic lights,
and entrance to a freeway. If I can pass these mpg-killing points with mild loss of fuel, my over all mpg will improve a lot. In fact after I realized this, my MPG is improving from 39 to 46!
Thinking mathematically saves lots of fuels and money!
(I lied here, it doesn't save much money for me because I live close to my office.)

Sunday, September 2, 2012

Graph of Sine and Cosine Function.

I just come up with the idea to momerize the graph of Sine function and Cosine function.

It is fairly easy for student to recollect that these function has wavy shape.
The harder part was apparently the distinction between these two function.
Guess which one is y=sin(x)?


Imagine the capital letter S of sine and C of cosine rotated 90 degrees.
Here is the answer.
The blue one is S, and the red one is C.


Sunday, September 25, 2011

See the Entire Picture.

Today was my first time to attach an image to my blogs.
I'm going to solve one simple math problem:
2x+1=7-x.



Please take a look at this ugly math picture.


This shows the solution to a simple linear equation : 2x + 1 = 7 - x.
We learn how to solve this equation in our first algebra course. It is like this:

2x + 1 = 7 - x
2x + x = 7 -1
3x = 6
x= 2
I would call it "Just Calculate It" method.

But at precalculus level (I guess), we learn to use graphs to solve the same problem.
The blue line is y = 2x + 1, showing the value of the LHS.
The red line is y = 7 - x, showing the value of the RHS.
We can see that LHS = RHS at (x,y)=(2,5).
This means that LHS = RHS when x = 2 and both sides become 5 at that time.

This "Graph" method requires a higher point of view than "Just Calculate It" method.
What's good about this?

Well, think about the Google Map.
Nowadays more people use "GPS", but I don't have one. So I still rely on Google Map.
When I want to go from Point A to Point B, Google Map can give me the Direction and Map.

"Just Calculate It" method is "Just Rely on Direction."
"Graph" method is "Use Direction and Map" .


Look at the following. I don't recommend "Just Rely on Direction." method.
Try to view the problem at the higher point of view.

By the way, did you notice that I wrote "blogs" in my first sentence?
It's not a mistake.
Please check my profile if you can read Japanese.



Driving directions to Boston, MA

This route has tolls.

New York, NY
1. Head southwest on Broadway toward Chambers St
0.2 mi
2. Turn right onto Barclay St
0.3 mi
3. Turn right onto West St
1.7 mi
4. Continue onto 11th Ave
0.6 mi
5. Continue onto New York 9A N/12th Ave
Continue to follow New York 9A N
7.4 mi
6. Take exit 14 for I-95/George Washington Bridge toward Cross Bronx Expy/W 178 St
0.4 mi
7. Follow signs for I-95 N/Cr Bronx Expy
0.2 mi
8. Keep left at the fork, follow signs for Interstate 95 N/Cross Bronx Expressway and merge onto Interstate 95 Lower Level N/George Washington Bridge
0.7 mi
9. Continue onto I-95 N
Partial toll road
Entering Connecticut
69.7 mi
10. Take exit 48 on the left to merge onto I-91 N toward Hartford
36.8 mi
11. Take exit 29 to merge onto CT-15 N/US-5 N toward I-84 E/E Hartford/Boston
0.5 mi
12. Continue onto CT-15 N
1.5 mi
13. Merge onto I-84 E
Partial toll road
Entering Massachusetts
40.8 mi
14. Keep right at the fork, follow signs for I-90 E/N.H. - Maine/Boston and merge onto I-90 E
Partial toll road
55.9 mi
15. Take exit 24 on the left for Interstate 93 S toward Quincy
Toll road
0.1 mi
16. Take exit 24A toward S Station
Toll road
0.1 mi
17. Keep left at the fork and merge onto Atlantic Ave
Partial toll road
0.6 mi
18. Keep right at the fork
0.4 mi
19. Turn left onto State St
0.4 mi
20. Slight left onto Tremont St
371 ft
Boston, MA