Back to Course

## Regression Analysis

0% Complete
0/0 Steps

#### Participants 206

Lesson 1, Topic 2
In Progress

# How does the Linear Regression Model Work?

##### Maria September 14, 2023
Lesson Progress
0% Complete

The Linear Regression Model at Work

There’s an X variable and a Y variable in this case.

The independent variable is on the x-axis, and the dependent variable is on the y-axis.

And we try to form a relationship between these two variables, and draw a line, in this case a straight line.

What we try to understand is as the independent variable is moving, or changing, what happens to the dependent variable? Does it go up, or does it go down? How does it change?

If they move in the same direction, if the independent variable increases, and the dependent variable increases as well, we say there’s a positive relationship.

If, on the other hand, as the independent variable increases, and the dependent variable decreases, we say there’s a negative relationship.  In this case the line would go downward.

In linear regression, we try to make a straight  line. You can also do curved lines, but for this topic, it’s all straight lines.

To conduct regression, you need to take observations or data points, and then try to find a line that will fit, a straight line that fits through all these different points. This is called the regression line, and it’s based upon the least squares method.

And in the end, you want to minimize the difference between the estimated value and the actual value. You want to minimize the errors.

Now let’s imagine I put study time on the X-axis, or make that my independent variable, and the dependent variable becomes grades or GPA.

As study time increases, grades should go up. There is a positive relationship.

IMAGE

In regression, we develop these equations like this.

ŷ = ß₀ + ß₁X₁

In this case, ŷ is estimated grades, and it’s based upon, or it’s equal to ß₀ + ß₁X₁  where x is study time. In this case, the slope is positive.

Now if we change the x-axis to time on Facebook, we see a negative relationship.

IMAGE

With more time on Facebook, grades will suffer and go down. A negative relationship.

What we’re estimating is still grades. Estimated grades is equal to     ß₀ -ß₁X₁, where x is time on Facebook.

ß₀ is still the y-intercept.

The slope of the line is -ß₁, because it’s downward sloping. Negative relationship.

Let’s remember:

• The X is the independent variable.
• The Y is the dependent variable. The X is what we control, what we manipulate, what we change.
• The dependent variable is the outcome.

So study time is the independent variable. It’s what we control and manipulate. And your grades are dependent upon how much you study.