Assignment 2: Testing for Correlation by Linear Regression
The goal of many studies is to determine if there is a relationship between factors. In other words, does one factor influence the outcome of another factor? If there is a relationship between the factors, then there is a correlation. Through this module’s lectures and readings, you will know that findinga correlation does not necessarily mean that you have found a causal relationship. This would need to be determined by another layer of investigation. Indeed, many times correlation does not always lead to the determination of causation, but it can help to identify if there is not a causal relationship between the variables in the study.
One way to determine correlation is to see if there is a linear relationship between the factors. A linear relationship can be tested by graphing a scatter plot of the data in the study and seeing if a best-fit line can be drawn to represent this data. This method of analysis is called linear regression. The formulas for linear regression are cumbersome, but luckily, most spreadsheets have built-in functions for performing these tedious calculations.
In this assignment, you will use a spreadsheet to examine pairs of variables, using the method of linear regressions, to determine if there is any correlation between the variables. Afterwards, postulate whether this correlation reveals a causal relationship—why or why not?
Click here to open the Excel spreadsheet containing the data for this assignment.
Notice that there are several tabs on the spreadsheet, each containing a different set of data from different studies. On each of these sample tabs, you will also find the question that was explored in that study. Select the data set that you find interesting, and perform the analysis below. You are only required to perform this analysis on one set of data. There is a tab labeled Example where you can see how your analysis should look when done.
In the Excel spreadsheet, perform the following operations:
- Save the spreadsheet on your computer.
- Select the study data you want to use. With your mouse, highlight all of the data on the spreadsheet in columns A and B.
- In the tabs at the top of the page, click Insert.
- In the Insert ribbon, in the Charts section, click Scatter. Be sure to select the option where it will just plot dots, it will be called Scatter with only Markers. If you do this right, then you will see a chart on the page.
- Now, on the chart, right-click on one of the data points (dots). Just pick a dot somewhere near the middle of the distribution.
- Select Add Trendlinefrom the drop-down menu that appears when you right-click on a dot.
- A new menu will appear. Select Linear, select Automatic, and click the box next to Display R-squared value on chart.
- Click Close.
- Now, you should see a line drawn through the dots. It will roughly cut through the middle of the dot distribution.
- You will also see the R2 value displayed next to the line.
In a Word document, respond to the following:
- What was the sample you selected and the question that was explored in the study?
- What was the R2linear correlation coefficient and the linear regression equation produced in the Excel spreadsheet?
- What would be the value of Pearson’s R?
- Would Pearson’s R be positive or negative? What does this imply about the relationship between the factors in this study?
- What is the implication of any correlation found between the variables in the study you picked?
- Does this correlation imply a causal relationship? Explain.
- Were there other variables that you think should have been examined? How would have those variables improved the correlation results of this study or helped to pinpoint where the factors were causal?