The equation of the best fit straight line of Y on X
Linear regression is a statistical technique closely related to correlation analysis, and extended into multiple regressions. Linear regression is used where we have one predictor (which must be either binary or categorical) of one outcome measure (which must be continuous); for example, if we wish to predict the outcome on a test (X & Y see Figure below) of Y using X as a predictor, we would want to examine the relationship between X and the Y. The aim of the regression analysis is to represent the relationship between X and Y as a straight line on a scatter-plot.
We could also show the line as an equation. The general form of the equation is: Yi = b0 + b1X1 where y is the outcome variable (score); x is the predictor variable (age); b1 is the slope of the line (the regression coefficient); b0 is the constant (also called the intercept), given to tell us the height of the line.
The results in table below show the regression equation for the above fitted straight line; it can be that the intercept of the slope is 22.839 which are significant as the magnitude of sig. value is less than 0.05 which is the level of significance. The magnitude of the predictor X i.e. 2.698 is statistically significant as its sig. value is less than the level of significance.
Coefficientsa
Model
Unstandardized Coefficients
Standardized Coefficients
t
Sig.
B
Std. Error
Beta
1
(Constant)
22.839
2.621
8.712
.000
X
2.698
.472
.716
5.714
.000
a. Dependent Variable: Y
Y = 22.839 + 2.698(X)
In this example, we would write this as: Y = 22.839 + 2.698* (X)
Linear regression has three uses:
Prediction: we can use linear regression to predict a score on an outcome variable, based on a predictor. This may be used in applied psychology - we might be interested in how well a person will do ...