You are here:

Advanced Math/Math -- model fitting

Advertisement


Question
QUESTION: The following data represents (hypothetical) energy consumption normalized to the year 1900.  Plot the data.  Test the model Q = aebx by plotting the transformed data.  Estimate the parameters of the model graphically.

x     Year        Consumption
0     1900        1.00
10    1910        2.01
20    1920        4.06
30    1930        8.17
40    1940        16.44
50    1950        33.12
60    1960        66.69
70    1970        134.29
80    1980        270.43
90    1990        544.57
100   2000        1096.63

ANSWER: The problem really depends on whatQ=aebx means.  Is that ae^(bx)?

You need to find what some values are to solve this problem.
N is the number of items (count away and see if there aren't 11 of them).
A=Σx (0 + 10 + 20 + ... 90 + 100) ( it's easier to use x than year).
B=Σx² = 0² + 10² + 20² + .. + 90² + 100²
C=Σy = 1.00 + 2.01 + 4.06 + 8.17 + ... + 544.57 + 1096.63
D=Σ(xy) = 0*1.00 + 10*2.01 + 20*4.06 + ... + 90*544.7 + 100*1096.63.

To get a linear approximation, solve the matrix
|N A||x|
|A B||y|
=
|C|
|D|
where the first one is a 2x2 matrix, the second is a vector with 2 componets and on the other side of the equation (below the = sign) is another vector.

This comes down to solving the two equations
Nx + Ay = C, Ax + By = D

Note that the consumption looks very close to powers of 2
(which are 1, 2, 4, 8, 16, 32, 64,128, 256, 1024; using this it's more like y^n where y is x/10 and the consumption is the result; is the Q suppose to be ae^(bx)? )
---------------------------------------------------------------
That changes things a lot.
Compute the ln() of the consumption column and see what the average number is such that x^n = nth componet of this arrary (starting with element 0).  The equation would then be to find the best fit straight line through the ln() of these points using 0,1,2,...,9,10 for the x values and thr third column as the y values.

Instead of getting a1 + a2*x, you will get a1*e^(a2*x).


---------- FOLLOW-UP ----------

QUESTION: In the question Q = aebx -- I didn't know how to input it on the computer.  The bx should up in the air next to the ae.  How would I plot this data?

Thanks,

Sharon

Answer
YOu need to find a and b, and get the use Excel to put down the x's in one column and the Y's in the other.
Choose Insert Chart XY(Scatter), and then click on the chart shown that is desired.
Note that the top one plots the points, the middle two plot the best fit curve that passes through those points, and the bottom two plot the points as a dot to dot.

Advanced Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scott A Wilson

Expertise

I can answer any question in general math, arithetic, discret math, algebra, box problems, geometry, filling a tank with water, trigonometry, pre-calculus, linear algebra, complex mathematics, probability, statistics, and most of anything else that relates to math. I can even tell you it takes me over 2,000 steps to go a mile, but is that relevant?

Experience

Experience in the area; I have tutored people in the above areas of mathematics for almost two years in AllExperts.com. I have tutored people here and there in mathematics since before I received a BS degree almost 25 years ago. In just two more years, I received an MS degree as well, but more on that later. I tutored at OSU in the math center for all six years I was there. Most students offering assistance were juniors, seniors, or graduate students. I was allowed to tutor as a freshman. I tutored at Mathnasium for well over a year. I worked at The Boeing Company for over 5 years. I received an MS degreee in Mathematics from Oregon State Univeristy. The classes I took were over 100 hours of upper division credits in mathematical courses such as calculus, statistics, probabilty, linear algrebra, powers, linear regression, matrices, and more. I graduated with honors in both my BS and MS degrees. Past/Present Clients: College Students at Oregon State University, various math people since college, over 7,500 people on the PC from the US and rest the world.

Publications
My master's paper was published in the OSU journal. The subject of it was Numerical Analysis used in shock waves and rarefaction fans. It dealt with discontinuities that arose over time. They were solved using the Leap Frog method. That method was used and improvements of it were shown. The improvements were by Enquist-Osher, Godunov, and Lax-Wendroff.

Education/Credentials
Master of Science at OSU with high honors in mathematics. Bachelor of Science at OSU with high honors in mathematical sciences. This degree involved mathematics, statistics, and computer science. I also took sophmore level physics and chemistry while I was attending college. On the side I took raquetball, but that's still not relevant.

Awards and Honors
I earned high honors in both my BS degree and MS degree from Oregon State. I was in near the top in most of my classes. In several classes in mathematics, I was first. In a class of over 100 students, I was always one of the first ones to complete the test. I graduated with well over 50 credits in upper division mathematics.

Past/Present Clients
My clients have been students at OSU, people nearby, friends with math questions, and several people every day on the PC, and you're probably make one more.

©2012 About.com, a part of The New York Times Company. All rights reserved.