Linear regression is a statistical method that is used to understand the relationship
between two continuous variables. It helps us determine how one variable affects the
other and allows us to make predictions based on this relationship.
Calculating linear regression coefficient by hand can be challenging. This summary will
guide you, using a practical example, to compute the coefficient for a simple linear
regression coefficient.
What is a regression line?
A regression line shows the connection between scattered data points in a dataset. It
displays the relationship between the dependent variable (Y) and the independent
variable (X), when there is a linear pattern.
By calculating the regression line, you can forecast the future behavior of the dependent
variable using different values.
Regression line is formulated as shown in the equation below:
Y = mX + c
Where:
X – independent variable
Y – dependent variable
m – coefficient of regression model
c – y-intercept
Example: Calculating linear regression by hand using weight and height data of
seven subjects
We’ll use the dataset below to compute the regression coefficient
Weight (lbs) Height (inches)
140 60
155 62
159 67
179 70
192 71
200 72
212 75
Steps to fit a linear regression model to the above dataset, using weight
(independent variable) and height (continuous variable)