How do you calculate the least squares fit to data?

Suppose the data is given by two lists

xi={1,2,3,4,5}
yi={1.1,3.3,4.5,4.2,6.3}
  1. Place the x values in L1 and the y-values in L2. This can be done in one of two ways, either directly through: {1,2,3,4,5}->L1
    {1.1,3.3,4.5,4.2,6.3}->L2
    or by the pressing the [Stat] key, and selecting "Edit". The values for L1 and L2 can be directly entered into the first two columns of the table.
  2. The equation for least squares can be found by entering [Stat] and selecting "Calc" then "LinReg(ax+b)"
  3. To plot the points, enter [2nd][Stat Plot]. Select Plot1 (or Plot2 or Plot3), making sure it is "On".
  4. Choose the scatterplot display (first option).
  5. Set XList: to be L1 and YList: to be L2
  6. Enter [Y=], and select Plot1. For the variable enter [Vars]-> "Statistics"->"Eq"->"RegEq"
  7. Enter [Window], and set up correct ranges.
  8. Enter [Graph]
  9. The display should be as shown below