Saturday, September 27, 2014

I am given 2 columns of different numbers. How do I find the "mathmatical relationship" between the two. For...

Rearrange the data as follows:


x values   y values      xdiff      ydiff           slope=ydif/xdiff


x1=612     2052 =y1


x2=693     2779=y2     81          727               8.9753


x3=721     2170=y3     28         -609            -12.7747


It is possible to fit (i) a line of best fit of the form y=mx+c , but here as the y difference/xdifference is too much diffrent the slope is not constant and so the linear relationship is not suitable. (ii) a prarabola of 2nd degree of the form y=ax^2+bx+c between x and y.So, I chose the second form to fit here that establish the relation between x and y.


Since there are 3 pairs of entries we can find a solution of the form y=ax^2+bx+c. Then we get 3 equations if we substitute x=xi and y=yi for i=1,2 and 3 and i  is  a suffix to x or y.


axi^2+bxi+ c = yi  for i =1,2 and 3


Solve the 3 simultaneous equations and determine the values of a,b and c. Substituting the values for xi's and yi's we get:


a(612)^2+b(612)+c=2052         (1)


a(693)^2+b(693)+c= 2779        (2)


a(727)^2+b(727)+c=2170         (3)


(2)-(1) eliminates c and (3)-(2) also eliminates c. We get 2 equation with 2 unkwons in a,b to be determined.:


a{693^2-612^2)+b(693-612)=2779-2052


a(721^2-693^2)+b(721-693)=2170-2779


Equations  reduces to after dividing the former by (693-612) and the latter by (721-693):


1305a+b=8.97508642           (4)


1414a+b=-21.75                    (5)


(5)-(4) eliminates b , giving an equation with only a to be determined:


109a=30.72508642


a=-0.281881526


Substiture a=-0.281881526  in equation (5) to get b and


b=-21.75-1414(-0.281881526)=376.83047789


Having known a and b ,substitute the values of them in any of the original equations flagged at (1 ) or (2) or (3), to obtain c. So you will get the requred relation once you know all a,b and c  determined:


From equatio (1)


c= 2052-(a*612^2+b(612)


=2052-{-0.281881526*612^2+376.83047789*612}


=-122991.2181


Therefore the relation required is:


y=(-0.281881526)x^2+(376.83047789)x-122991.2181.


Hope this helps.

No comments:

Post a Comment