Fitting a curve of the form Y = ae^(-b) using Least Squares Estimators

782 Views Asked by At

I'm trying to fit a set of data into the curve Y=ae^(-bx) There are 6 pairs of data (time,quantity).

I have used log on both sides, which gave me logY = log(a)-bx. And substituted A=log(a) and B = -b

I then made an excel table with all the relevant data:

    Time    quantuty Log          mult         Time^2
    2       1.6      0.204119983  0.408239965   4
    4       1.5      0.176091259  0.704365036   16
    6       1.45     0.161368002  0.968208013   36
    8       1.42     0.152288344  1.218306755   64
    10      1.38     0.139879086  1.398790864   100
    12      1.36     0.133538908  1.6024669     144
    42               0.967285583  6.300377534   364
    7                0.16121426

The last 2 rows are sum and mean

And used the estimators, with x=x and y=log(quantity) (sum(x*y)-mean(x)*sum(y)) / (sum(x^2)-n*mean(x)^2) to find B and mean(Y) - B*mean(X) to find A. I got the values A=0.208 and B=-0.00672.

I then use B=-b to find that b = 0.00672 and A=log(a) to find that a = e^(0.208) = 1.23

I'm stuck here since if I plug a and b in the Y=ae^(-bx) formula I get the wrong values for Time 2 to 12 (way off). I also tried to take the e^() of the results since I did do log(Y) earlier but that doesn't work either.

I'm not sure where to go from there and I'm not sure if I messed up somewhere.

1

There are 1 best solutions below

1
On BEST ANSWER

Log in excel is log base 10. If you used LN(...) you would have been on the right track.

The answer you are looking for comes out to $y = 1.615 e^-0.0155x$ which at the given points predict 1.566, 1.518, 1.472, 1.427,1.384, 1.342. At at $x=7$ it predicts 1.449, and at $x=42$ it predicts 0.843.