# Inference for Simple Linear Regression in Microsoft® Excel

## Chapter 9, Printout 1

Note: While the focus of this example is inference for simple linear regression, the data used and the procedure followed are nearly identical to those for Printout 1 of Chapter 4. This example merely restates the instructions found in "Fitting a Line by Least Squares" in a more compact form. Excel's data analysis tools do not offer the option of plotting confidence limits for mean response, so the plot generated is identical; however, the summary information does include confidence limits for the slope and intercept.
1. Launch Excel.

2. Enter the data.

• In cell A1, type "Pressure"

• In cell B1, type "Density"

• In cells A2-A16, enter the pressure data from the x column in Table 4.1 (p. 124).

• In cells B2-B16, enter the density data from the y column in Table 4.1.

Screenshot:

3. Plot density vs. pressure.

• Select "Tools --> Data Analysis."

• In the dialog box that follows, select "Regression" from the list.

Screenshot:

• Click "OK."

• Fill out the resulting dialog box as follows:

Input Type Label Value
Input Y Range: \$B\$1:\$B1\$16
Input X Range: \$A\$1:\$A\$16
Labels checked
Constant is Zero unchecked
Confidence Level unchecked
New Worksheet Ply: selected
New Worksheet Ply:
Residuals checked
Residual Plots unchecked
Standardized Residuals checked
Line Fit Plots checked
Normal Probability Plots unchecked

Screenshot:

• Click "OK."

Excel places the regression summary and line-fit plot in a new sheet of the workbook.

Screenshot (summary output):

Screenshot (plot):

Note: you can resize all columns to fit their contents by selecting all the cells you want to resize, then selecting "Format --> Column --> Autofit Selection."