How to do a simple linear regression test in Excel

advertisement
How to do a simple linear regression test in Excel
Linear regression tests whether a statistically significant relationship exists between two
variables. One variable is considered the independent variable (also called predictor or
covariate). This is the variable that you expect has an effect on the other one. The
other variable is the dependent variable (also called response). This is the variable that
you expect will vary in response to the independent variable. In this example, I expect
that white sucker catch per unit effort (WS_CPUE) should vary in response to water
depth (Avg Depth), but I want to test how well these data support that hypothesis.
Step 1
Arrange your data into two columns. In this case, WS_CPUE is dependent variable (Y
Range), Avg Depth is independent variable (X Range).
Step 2
From the menu bar in Excel, choose Tools, then Data Analysis, then Regression. Enter
the cell ranges for your variables into “Input Y Range” (dependent), and “Input X Range”
(independent). Other parts of this dialog box can be left as they were.
Note: If you don’t see Data Analysis under Tools, you will need to install it. Again,
choose Tools, then Add-Ins, then check the box by Analysis ToolPack, and click OK.
You may need the software CD for this process.
Step 3
The regression results will be put in a new worksheet. Only two numbers need to be
retrieved from this output: “R Square” and “P-value for X Variable”. Do not display
entire output in your paper. The R2 value describes how much of the variance in the Y
variable is explained by the X variable. The p-value is used to assess whether a
significant relationship exists between the variables (it’s more complex than this, but
don’t worry about the details). There are two common ways of interpreting p-values.
One is black-and-white:
If p<0.05, then the relationship is significant.
If p>0.05, then the relationship is not significant.
The other allows for shades of gray:
If p<0.001, then very strong evidence for a relationship.
If p<0.01, then strong evidence for a relationship.
If p<0.05, then moderate evidence for a relationship.
If p<0.10, then weak evidence for a relationship.
If p>0.10, then no evidence for a relationship.
In this case, because the X-variable p-value is 0.009, there is a significant relationship
between white sucker CPUE and water depth. Alternatively, there is strong evidence
that a relationship exists. However, the R2 value of 0.45 indicates that less than half
(45%) of the variance in sucker CPUE is explained by water depth. Other factors
explain the remaining variance. In summary, the p-value tells you if a relationship
exists, while the R2 value tells you how strong that relationship is.
Download