This section is a continuation of section 2.6, Exploring Data: Linear Models and Scatter Plots. Please see that section for the introductory information on how to enter data into your calculator, create scatter plots, and perform regression.
Model | Calculator Command | Equation |
---|---|---|
Linear | LinReg(ax+b) L1, L2 | y = ax + b |
Quadratic, At least 3 points required |
QuadReg L1, L2 | y = ax2 + bx + c |
Cubic, At least 4 points required |
CubicReg L1, L2 | y = ax3 + bx2 + cx + d |
Quartic, At least 5 points required |
QuartReg L1, L2 | y = ax4 + bx3 + cx2 + dx + e |
Logarithmic | LnReg L1, L2 | y = a + b ln x |
Exponential | ExpReg L1, L2 | y = a bx |
Power | PwrReg L1, L2 | y = a xb |
Logistic (TI83 only) | Logistic L1, L2 | y = c / ( 1 + a e-bx ) |
Sinusoidal (TI83 only), At least 4 points required |
SinReg L1, L2 | y = a sin (bx + c) + d |
With the TI-83, you may store the regression equation directly into a y-variable by specifying the y-variable after the lists where your data is stored. Example: "LnReg L1, L2, y1" would compute the logarithmic model and save the result into y1.
Model | Calculator Command | Equation |
---|---|---|
Linear | LINR | y = a + bx |
Quadratic, At least 3 points required |
P2REG | You are given a list of coefficients. These coefficients are in standard form, so the first coefficient will be the leading cofficent, and the last coefficient in the list will be the constant. |
Cubic, At least 4 points required |
P3REG | |
Quartic, At least 5 points required |
P4REG | |
Logarithmic | LNR | y = a + b ln x |
Exponential | EXPR | y = a bx |
Power | PWRR | y = a xb |
Notice that things are a little different for the TI-85 when it comes to polynomial regression. The results are not given in equation form with individual coefficients, but are given as a list of coefficients and stored in the variable PRegC. If PRegC = { 3, 2, -1, 5 }, then the regression equation would be y = 3x3 + 2x2 - x + 5. DRREG will correctly draw the regression equation even if polynomial regression is used.
The concept behind fitting a model to data is to find the model that has the smallest deviation from the actual data. This deviation is the predicted (estimated by the model) y-value minus the actual y-value. These deviations are all squared to make sure they don't cancel each other out, and then added. We're then looking for the smallest sum of the squared deviations, that is the "Least Squares" model.
Note problems 35 and 36 will be much easier if you follow the instructions here than the instructions in the book.
Assume that you have entered the x-values into list 1 and the y-values into list 2. You have computed whichever model you're working with and have saved the resulting equation into y1.
The predicted y-values can be found by evaluating y1 at each x-value (list 1): y1(L1)
The sum of the squared deviations can be found using the following command:
sum ( ( L2 - y1(L1) )2 )
The model with the smallest sum of the squared deviations is the best model.
With the TI-85, this is a much harder task to accomplish. Calculate the regression equation as normal, then enter the following expression to find the sum of the squares (extra spaces inserted for readability).
sum seq( ( yStat(x) - fcsty xStat(x) )2, x, 1, dimL xStat, 1)
If someone can find an easier way on the TI-85, then please let me know. You may want to write a short program with that command in it.
We mentioned the correlation coefficient, r, back in section 2.6. Back then, it was only for linear models. We can also compute (well, we'll let the calculator compute) the value for r and r2 for nonlinear models also.
Back in section 2.6, we said that the closer the value of r was to 1 or -1, the better the model fit the data. For nonlinear models, we often ignore the value of r and look at the value of r2. The value of r2 can be found by simply squaring r.
There is always variation in your data. That is, never (almost) is all of the data exactly the same. The interpretation of r2, from a statistical point of view is the percent of the variation that can be explained by the model. The higher the value of r-squared, the better the model explains the data.
The TI-85 does not calculate the value of r2 for polynomial (quadratic, cubic, or quartic models). For the other models, you may have to square the correlation (corr variable). The variables necessary to easily compute the value the correlation coefficient aren't computed when doing polynomial regression, so finding r or r2 for polynomial regression are going to be extremely difficult for the TI-85 users. I suggest you find a TI-82 or TI-83 and borrow it long enough to do that particular regression model.
The model with the highest value for r2 is the best model.