Help with fitting an equation to a set of points

chris92w

New member
Joined
Oct 30, 2010
Messages
12
I need to come up with a function that fits the following points (Year = X; Pop. = Y):

Year |Population in Millions
1950 |554.8
1955 |609
1960 |657.5
1965 |729.2
1970 |830.7
1975 |927.8
1980 |998.9
1985 |1070
1990 |1155.3
1995 |1220.5

Currently I have " f(x)=48x^(1/3)+918 " and I need to move the function to the right horizontally by 1,975; and Im not sure how to do so.
 
To stretch a graph horizontally, use y=f(cx), with 0<c<1. The graph is stretched horizontally by a factor of 1/c.

For instance, if we wanted to stretch \(\displaystyle x^{3}-4x^{2}\) by a factor of 2, we would sub in x/2 for x, where c=1/2:

\(\displaystyle (\frac{x}{2})^{3}-4(\frac{x}{2})^{2}\).

\(\displaystyle 1/(1/2)=2\)
 
alright I've tried stretching the graph to make it fit properly, and its not working.

currently, the equation I have so far is " f(x)=120(x-1975)^(1/3)+918 " (this is the equation of the blue curve).

ultimately I need the blue curve to become as close to the red curve (I just drew the red curve in with ms paint) as possible.

graphbn.png
 
May I ask what this is for?. I am not getting the correct values when using your formula.

Any value for x less than 1975 results in a complex solution.

If you are fitting a curve to the data, did you try a cubic regression?.

I got \(\displaystyle y=-.005676x^{3}+.418643x^{2}+7.355291x+555.254266\)

This has an R^2 of .998619, but I used 1950 as 0.

So, it is pretty accurate.

But, if this is not what you are up to, please let me know the entire problem so I may be able to help more thoroughly.
 
galactus said:
May I ask what this is for?. I am not getting the correct values when using your formula.

Any value for x less than 1975 results in a complex solution.

If you are fitting a curve to the data, did you try a cubic regression?.

I got \(\displaystyle y=-.005676x^{3}+.418643x^{2}+7.355291x+555.254266\)

This has an R^2 of .998619, but I used 1950 as 0.

So, it is pretty accurate.

But, if this is not what you are up to, please let me know the entire problem so I may be able to help more thoroughly.

I tried plugging your equation into TI interactive (the program im graphing this with) and it was no where near the points I'm aiming for. Also, Im not really sure what a cubic regression is.

and can you explain what you mean by "This has an R^2 of .998619, but I used 1950 as 0"?

The assignment I'm doing is to investigate different functions that best model the population of China from 1950 to 1995.

In the assignment I'm supposed to develop a model function that fits the data points on the graph.

Right now I have to leave, but I'll be back tomorrow to see if you responded.
 
chris92w said:
I need to come up with a function that fits the following points (Year = X; Pop. = Y):

Year |Population in Millions
1950 |554.8
1955 |609
1960 |657.5
1965 |729.2
1970 |830.7
1975 |927.8
1980 |998.9
1985 |1070
1990 |1155.3
1995 |1220.5

Currently I have " f(x)=48x^(1/3)+918 " and I need to move the function to the right horizontally by 1,975; and Im not sure how to do so.

What method have you been taught to find best fit curve?

In otherwords,

how did you arrive at f(x) = 48x^(1/3)+918?

What did you use as 'x' - the years?
 
Subhotosh Khan said:
What method have you been taught to find best fit curve?

In otherwords,

how did you arrive at f(x) = 48x^(1/3)+918?

What did you use as 'x' - the years?

I needed to find an "s" curve of some sort and x^(1/3) looked promising. I added 918 to bring up to the points vertically, and 48 was just a random number I came up with to stretch it out a bit.

currently I've gotten 120(x-1975)^(1/3)+918 as an equation, but I'm beginning to think it wont work for a population graph, because in the middle of the curve it ends up being straight up and down vertically. Oh, and I'm on the verge of giving up on this, because I have a poetry project due tomorrow also. lol
 
Populations usually do not follow that sort of model. Use the cubic I showed you and it is retty close.

Enter in x=0 and you get the population for 1950. Enter x=5 and you get the population for 1955, etc.
 
Here are some other models to consider:

As before, let 1950 be x=0. For instance, for the population in 1970, enter in x=20

Exponential regression:

\(\displaystyle y=561.035903\cdot 1.018431^{x}\)

Quartic regression:

\(\displaystyle y=.000142331x^{4}-.018485x^{3}+.778029x^{2}+4.152844x+559.097203\)

They are close, but none will give the exact value as in the chart. That is why it is called a 'Best Fit".

The R^2 tells us how accurate the model is. The closer to 1, the better. The quartic above has an R^2 of .998

That's as good as can be expected.
 
2 things:

How do I move those equations to the right so they're lined up with the points? I tried to make the first equation be 561.035903*(1.018431^(x-1950)) and it just kind of went crazy.

Also, can you explain how you got all of the various decimals and stuff in the equation? I'm supposed to explain how I got what I did.
 
chris92w said:
2 things:

How do I move those equations to the right so they're lined up with the points? I tried to make the first equation be 561.035903*(1.018431^(x-1950)) and it just kind of went crazy.

Also, can you explain how you got all of the various decimals and stuff in the equation? I'm supposed to explain how I got what I did.

I guess i dont really need to move it to the right. I'll just say "let 1950 be x=0" or something along those lines. But I do need to know how you got all those crazy decimals. Last year in my physics class we did some things similar to this and we used a program (not sure what it was) that comes up with a function for you to fit a set of points... is that what you did? Thanks for the help by the way.
 
Yes, I certainly did not do it by hand. I ran the data through my calculator, which does all sorts of regressions and curve fitting.

Excel also does a fine job of performing various regressions.

For t=0 is 1950, it is easier to let the base year be 0, then using large numbers like 1950. If 1950 is 0, then 1955 is 5, 1960 is 10, and so on.
 
galactus said:
Yes, I certainly did not do it by hand. I ran the data through my calculator, which does all sorts of regressions and curve fitting.

Excel also does a fine job of performing various regressions.

For t=0 is 1950, it is easier to let the base year be 0, then using large numbers like 1950. If 1950 is 0, then 1955 is 5, 1960 is 10, and so on.

alright, I've decided to use the quartic regression for the graph.

If you could help me out with one last thing, that would be awesome.

the next question of the problem is

" A researcher suggests that the population, P at the time t can be modeled by

\(\displaystyle P(t)=K/(1+Le^{-Mt})\)

Use technology to estimate and interpret K, L and M. Construct the researcher's model using your estimates. "

So far I have \(\displaystyle P(t)=1400/(1+(1*10^{54})e^{-.0635t})\)

where:
K = 1400
L = \(\displaystyle 1*10^{54}\)
M = .0635
and t = x

Ive been messing around with it for awhile and i cant figure out how to make it fit.

graph2.png
 
alright so I came up with the equation \(\displaystyle P(t)=1100/(1+(1*10^{55})e^{-.06425t})+300\) and it fits pretty damn good. although, I had to add 300 at the end, which is probably an illegal move, but at this point I dont care.
 
\(\displaystyle If \ you \ have \ a \ computer, \ calculator, \ etc., \ that \ has \ "a \ best \ fit \ regression", \ use \ it.\)

\(\displaystyle Note: \ Isn't \ modern \ technology \ something \ else? \ A \ few \ years \ back \ you'ld \ be \ up \ all \ night\)

\(\displaystyle trying \ to \ get \ a \ decent \ equation \ for \ this \ data.\)
 
Top