Inferential tests can be run on both the correlation and slope estimates calculated from a random sample from a population. This equation can also be used to predict values of Y for a value of X. Beyond giving you the strength and direction of the linear relationship between X and Y, the slope estimate allows an interpretation for how Y changes when X increases. The slope, b 1, is the average change in Y for every one unit increase in X. The intercept, b 0, is the predicted value of Y when X=0.
![excel linear regression excel linear regression](https://cdn.lynda.com/video/190079-76-635459175178531031_338x600_thumb.jpg)
A general form of this equation is shown below: A perfect linear relationship ( r=-1 or r=1) means that one of the variables can be perfectly explained by a linear function of the other.Ī linear regression analysis produces estimates for the slope and intercept of the linear equation predicting an outcome variable, Y, based on values of a predictor variable, X. If r is negative, then as one variable increases, the other tends to decrease. If r is positive, then as one variable increases, the other tends to increase. The sign of r corresponds to the direction of the relationship. The further away r is from zero, the stronger the linear relationship between the two variables. The Pearson correlation coefficient, r, can take on values between -1 and 1.
![excel linear regression excel linear regression](https://i0.wp.com/regressit.com/uploads/3/5/3/1/35316214/rcodenew5_orig.png)
A correlation analysis provides information on the strength and direction of the linear relationship between two variables, while a simple linear regression analysis estimates parameters in a linear equation that can be used to predict values of one variable based on the other. A correlation or simple linear regression analysis can determine if two numeric variables are significantly linearly related.