# How do I perform linear regression on data?

##### 1 Answer

You need to see full answer to understand

#### Explanation:

I don't fully know what you mean first you get your data set where you regress y on x to find how a change in x effects y.

x y

1 4

2 6

3 7

4 6

5 2

And you want to find the relationship between x and y so say you believe the model is like

or in stats

these

So

This tells you that the predicted coefficents will give you the predicted y value.

So now you want to find the best estimates for these co-efficents we do this by finding the lowest difference between the actual y value and predicted.

This basically says that you want the minimum of the sum of the differences between the acutal y values and predicted y values for your regression line

So the formulas for finding them are