When investigating the relationship between two or more numeric variables, it is important to know the difference between correlation and regression. The similarities/differences and advantages/disadvantages of these tools are discussed here along with examples of each. Show
Correlation quantifies the direction and strength of the relationship between two numeric variables, X and Y, and always lies between -1.0 and 1.0. Simple linear regression relates X to Y through an equation of the form Y = a + bX. Key similarities
Key differences
Prism helps you save time and make more appropriate analysis choices. Try Prism for free. *The X variable can be fixed with correlation, but confidence intervals and statistical tests are no longer appropriate. Typically, regression is used when X is fixed. Learn more about correlation vs regression analysis with this video by 365 Data Science Key advantage of correlation
Key advantage of regression
Correlation ExampleAs an example, let’s go through the Prism tutorial on correlation matrix which contains an automotive dataset with Cost in USD, MPG, Horsepower, and Weight in Pounds as the variables. Instead of just looking at the correlation between one X and one Y, we can generate all pairwise correlations using Prism’s correlation matrix. If you don’t have access to Prism, download the free 30 day trial here. These are the steps in Prism:
The Prism correlation matrix displays all the pairwise correlations for this set of variables.
Key findings:
Note that the matrix is symmetric. For example, the correlation between “weight in pounds” and “cost in USD” in the lower left corner (0.52) is the same as the correlation between “cost in USD” and “weight in pounds” in the upper right corner (0.52). This reinforces the fact that X and Y are interchangeable with regard to correlation. The correlations along the diagonal will always be 1.00 and a variable is always perfectly correlated with itself. When interpreting correlations, you should be aware of the four possible explanations for a strong correlation:
Regression ExampleThe strength of UV rays varies by latitude. The higher the latitude, the less exposure to the sun, which corresponds to a lower skin cancer risk. So where you live can have an impact on your skin cancer risk. Two variables, cancer mortality rate and latitude, were entered into Prism’s XY table. The Prism graph (right) shows the relationship between skin cancer mortality rate (Y) and latitude at the center of a state (X). It makes sense to compute the correlation between these variables, but taking it a step further, let’s perform a regression analysis and get a predictive equation. The relationship between X and Y is summarized by the fitted regression line on the graph with equation: mortality rate = 389.2 - 5.98*latitude. Based on the slope of -5.98, each 1 degree increase in latitude decreases deaths due to skin cancer by approximately 6 per 10 million people. Since regression analysis produces an equation, unlike correlation, it can be used for prediction. For example, a city at latitude 40 would be expected to have 389.2 - 5.98*40 = 150 deaths per 10 million due to skin cancer each year.Regression also allows for the interpretation of the model coefficients:
Improve your linear regression with Prism. Start your free trial today. Summary and Additional InformationIn summary, correlation and regression have many similarities and some important differences. Regression is primarily used to build models/equations to predict a key response, Y, from a set of predictor (X) variables. Correlation is primarily used to quickly and concisely summarize the direction and strength of the relationships between a set of 2 or more numeric variables. The table below summarizes the key similarities and differences between correlation and regression.
Learn more about how to choose between regression and correlation on Prism Academy Test your understanding of Correlation and RegressionWhich tool, correlation or regression, would you use in each of these scenarios:
Answers:
Start your free trial of Prism today What is used to determine the strength of a linear fit?We can measure the strength of the linear relationship, by using a correlation coefficient.
Which method is used to obtain the best fitting regression line?The more precise method involves the least squares method. This is a statistical procedure to find the best fit for a set of data points by minimizing the sum of the offsets or residuals of points from the plotted curve. This is the primary technique used in regression analysis.
What is line of best fit in regression analysis?What Is a Line of Best Fit? The line of best fit , also called a trendline or a linear regression, is a straight line that best illustrates the overall picture of what the collected data is showing. It helps us to see if there is a relationship or correlation between the two factors being studied.
What measure of the strength and direction of association can we get from a linear regression model?Correlation Coefficient: The correlation coefficient (r) is a numerical measure that measures the strength and direction of a linear relationship between two quantitative variables.
|