Jump to content

Finding the Best Fit Line


Introduction

This document explains how the calculator is used to find the best-fit line.

Information

To find the equation for the best-fit line, please follow the steps below:
NOTE: Set the calculator mode to RPN. The APPROX mode must be selected or the numbers typed into the matrix writer should have a decimal point (for example, 3. instead of 3).
  1. Press the LEFT SHIFT key, then MTRW.
  2. Type in the “x” variables in the first column, and “y” variables in the second column.
    NOTE: Make sure the "VEC" soft menu key does not have a square in it. If it does, press the key under the "VEC" to remove it.
  3. Press ENTER.
  4. Name the variable ABC1: Press ALPHA twice, A, B, C, 1, and then ALPHA.
  5. Press STO. The matrix will disappear from the display and be stored in the ABC1 variable.
  6. Press the RIGHT SHIFT key, then STAT.
  7. Using the arrow keys, select FIT DATA and press OK.
  8. Highlight the SigmaDAT field, then press CHOOS.
  9. Select ABC1, then press OK. X-Col should be 1 and Y-Col should be 2.
  10. Highlight the MODEL field, then press CHOOS.
  11. Select LINEAR FIT and press OK. Press OK again.
The line information will be displayed on the stack. If the equation for the line is not completely shown on the stack, use the up arrow key to highlight the corresponding stack level and press view. Then, by using the right arrow key, you can see the rest of the equation.

Example

If the matrix consists of these values:
XY
5. 6.
4. 5.
3. 7.
6. 9.
The result for best-fit line will be as follows:
3.6 + .7*X
Correlation: .529150262213
Covariance: 1.166666667