Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: exponential regression
Replies: 1   Last Post: Feb 3, 2013 8:19 PM

 Bob Hanlon Posts: 906 Registered: 10/29/11
Re: exponential regression
Posted: Feb 3, 2013 8:19 PM

I do not have a TI calculator so I cannot check; however, it appears
that the calculator was given (or defaults to) a different model:
a*x^b vice a*b^x. Although even with this other model, Mathematica
comes up with different results than what you indicate came from the
calculator.

data = {{1, 4.5}, {3, 14.0}, {5, 28.6}, {7, 54.1}, {8, 78.6}} //
Rationalize;

f1[x_] = a*b^x /. FindFit[data,
a*b^x, {a, b}, x]

4.666254411839531*1.4227203453064998^x

f2[x_] = a*x^b /. FindFit[data,
a*x^b, {a, b}, x]

1.17537380064539*x^2.0035258937349667

There does not appear to be a locally optimal fit ("In the nonlinear
case, [FindFit] finds in general only a locally optimal fit") near the
reported results irrespective of the method used.

FindFit[data,
a*x^b, {{a, 3.947506}, {b, 1.334589}}, x,
WorkingPrecision -> 16,
Method -> #] & /@ {
Automatic,
"LevenbergMarquardt",
"Newton",
"NMinimize",
"QuasiNewton"}

{{a -> 1.175373799417422, b -> 2.003525894261809}, {a -> 1.175373793803054,
b -> 2.003525896660905}, {a -> 1.175373798908934,
b -> 2.003525894474658}, {a -> 1.175373799417422,
b -> 2.003525894261809}, {a -> 1.175373798541258,
b -> 2.003525894637715}, {a -> 1.17538,
b -> 2.00352}, {a -> 1.175373798541583, b -> 2.003525894637293}}

Plot[
Evaluate[{
Tooltip[f1[x], f1],
Tooltip[f2[x], f2]}],
{x, 0, 9},
Epilog ->
{Red, AbsolutePointSize -> 3, Point[data]}]

Bob Hanlon

On Sun, Feb 3, 2013 at 2:45 AM, <r.aufmann@gmail.com> wrote:
> I entered Clear[a, b, x]; FindFit[{{1, 4.5}, {3, 14.0}, {5, 28.6}, {7, 54=
.1}, {8, 78.6}}, a*b^x, {a, b}, x] as a text of exponential regression. Th=
e input returned {a->4.66625, b->1.42272}
>
> Fine. However, a student of mine entered the same data in a TI-84 calcul=

ator and it returned 3.947506 (x^1.334589). These two equations are obviou=
sly not the same. Does anyone know why there is a discrepancy? By the way=
, I tested a data set that is exactly exponential. FindFit and the TI-84 re=
turned exactly the same equation.
>
> Thanks for any insight.
>