Activity - Letting Excel Perform LINEST to give linear regression data
Set up a calibration data set as
given in Spreadsheet 22.4. To have
Excel calculate the pertinent
analysis data from the calibration
information, we use the linest
function in the following
procedure:
1. Highlight an area encompassing
two columns and three rows
22
(the
highlighted area in Spreadsheet
22.4 is in columns F and G, rows 7-
9).
2. With that area still highlighted,
start typing the function = linest(
3. After the open parentheses,
highlight all the y-values in the
calibration data, then enter a comma.
4. Next, highlight all the x-values in the calibration data, then enter a comma.
5. For the next parameter, you need to make a choice.
a. If you expect that the calibration data should pass through zero (intercept of zero), then enter a zero
followed by a comma.
b. If you want the function to calculate an intercept value, enter a 1, followed by a comma.
6. Now enter a 1, telling Excel to calculate stats beyond just the slope and intercept, close the
parentheses but do not simply press Enter.
7. To complete the calculation, press Ctrl + Shift + Enter (while holding down the Ctrl key, press the Shift
key, and while still holding down both of those, press the Enter key).
In the example given in Spreadsheet 22.4, the completed function looked like this, wherein we allowed
linest to calculate an intercept value:
=LINEST(C7:C11,B7:B11,1,1)
The information that Excel yields from the linest function includes the slope (m, in Cell F-7), the intercept
(b, G-7), the standard deviation in the slope (s
m
, F-8), the standard deviation in the intercept (s
b
, G-8),
the coefficient of determination (R
2
, F-9), and the standard deviation in the y-estimate (s
y
, G-9).
Note that if you need to edit your linest function, you will need to highlight the full 2x3 block again,
make your edits, then press Ctrl + Shift + Enter.
Exercise 22.13: Use Eq. 22.14 to calculate SS
y-y
for the example given in the preceding Activity
(Spreadsheet 22.4).
22
Actually, Excel will provide additional statistics, if we highlight an area that is 2 columns by 5 rows, but the
additional two rows of statistics are not generally as useful as the first 3.
Spreadsheet 22.4: The LINEST function in Excel
696