Sunday, September 17, 2006

How to Perform a Quadratic Regression on a TI-89

In class we went over how to perform a linear regression over a set of data, so I'm going to take that a step further and show how to do a quadratic regression.

Open up Apps > Data/Matrix Editor > New, type in something under variable, and press Enter. Note: Variable names cannot match system variables (such as linreg, expreg, quadreg).



Next you have to enter in a set of data, so let's just use the sample dataset

timepopulation
c1c2
11
24
39
416
525
636
749
864
981
10100

An easy way to type this set of data in would be enter the 1-10 under "c1", and then if you go over and highlight "c2", type in "c1^2," and the "c2" column will be populated with the squares of the "c1" values.

Now go to F2 > Plot 1 > F1. Under "Plot Type" choose scatter, under "x" and "y" put "c1" and "c2" respectively, and press Enter.

When you're back at the Data/Matrix Editor screen, go to F5, and change "Calculation Type" to "QuadReg." Once again for "x" and "y" enter in "c1" and "c2" respectively, under "Store RegEQ to," choose "y1(x)," and press Enter.

Now we just have to set a window for this graph, so let's use 0 for x-min and y-min, 10 for x-max, and 100 for y-max.

So that's how to do a quadratic regression, but how about if we wanted to do the same for an exponential or cubic function. Below is a table listing a few common regressions, and under the Calculate (F5) screen, you can just change which one you enter.

TypeCommandFormula
Cubic RegressionCubicRegy=ax^3+bx^2+cx+d
Exponential RegressionExpRegy=ab^x
Linear RegressionLinRegy=a+bx
Logarithmic RegressionLnRegy=a+b(ln(x))
Power RegrssionPowerRegy=ay=ax^b
Quadratic RegressionQuadRegy=ax^2+bx+c

0 Comments:

Post a Comment

<< Home