Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13345 > unrolled thread

exponential regression

Started byr.aufmann@gmail.com
First post2013-02-03 07:51 +0000
Last post2013-02-04 01:19 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  exponential regression r.aufmann@gmail.com - 2013-02-03 07:51 +0000
    Re: exponential regression svkeeley@aol.com - 2013-02-04 01:19 +0000

#13345 — exponential regression

Fromr.aufmann@gmail.com
Date2013-02-03 07:51 +0000
Subjectexponential regression
Message-ID<kel4u3$38p$1@smc.vnet.net>
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.  The input returned {a->4.66625, b->1.42272}

Fine.  However, a student of mine entered the same data in a TI-84 calculator and it returned 3.947506 (x^1.334589).  These two equations are obviously 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 returned exactly the same equation.

Thanks for any insight.

[toc] | [next] | [standalone]


#13362

Fromsvkeeley@aol.com
Date2013-02-04 01:19 +0000
Message-ID<ken2bm$7f4$1@smc.vnet.net>
In reply to#13345
> 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.  The input >returned {a->4.66625, b->1.42272}
>
> Fine.  However, a student of mine entered the same data in a TI-84 calculator >and it returned 3.947506 (x^1.334589).

One problem is that you and your student fitted different curves. You fitted the data to a*b^x and your student fitted the data to a*x^b.

This fits the data to the same curve as your student:

Clear[a, b, x]; FindFit[{{1, 4.5}, {3, 14.0}, {5, 28.6}, {7,
   54.1}, {8, 78.6}}, a x^b, {a, b}, x]

The result will be different:

{a->1.17537,b->2.00353}

Your student's calculator probably did a modified linear regression; Mathematica did a more sophisticated fit.  If you plot your student's 3.9475*x^1.3346 and Mathematica's 1.17537*x^2.00353 along with the origional data, you'll see that the Mathematica version gives a much better fit. The Mathematica answer for your first try, 4.66625*1.42272^x, also gives a better fit.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web