# Using Linear regressionWatch

#1
when you have an equation of the form y= mx + c, and you plot a graph of y against x, how can you use linear regression to find the slope m and the intercept c.

Is this just drawing a line of best fit and then carrying on as you normally would? or does it involve a more accurate method?
0
8 years ago
#2
(Original post by sonic23)
when you have an equation of the form y= mx + c, and you plot a graph of y against x, how can you use linear regression to find the slope m and the intercept c.

Is this just drawing a line of best fit and then carrying on as you normally would? or does it involve a more accurate method?
When you have an equation of the form y=mx + c you already have the slope and intercept.

I don't think that's what you meant though.

If you have a load of (x,y) pairs you have to choose m and c so as to minimise

Sum of (mx+c-y)^2

If you haven't studied how to do this then you should probably just look up linear regression formulae. They're given for example in A level formula books.
0
#3
(Original post by rnd)
When you have an equation of the form y=mx + c you already have the slope and intercept.

I don't think that's what you meant though.

If you have a load of (x,y) pairs you have to choose m and c so as to minimise

Sum of (mx+c-y)^2

If you haven't studied how to do this then you should probably just look up linear regression formulae. They're given for example in A level formula books.
There seems to be two methods i have come across.

One with the Sxy and Sxx calculations, and the other with two 'normal equations'.

Which one is more efficient?

Thanks
0
8 years ago
#4
They're the same thing.

Solving the normal equations leads to the Sxy/Sxx formula.

So using Sxy/Sxx nearly all the work has already been done for you and that's probably the way you want to go.

Depends what you were set to do or what you set yourself to do.
0
#5
(Original post by rnd)
They're the same thing.

Solving the normal equations leads to the Sxy/Sxx formula.

So using Sxy/Sxx nearly all the work has already been done for you and that's probably the way you want to go.

Depends what you were set to do or what you set yourself to do.
Ok thank you very much.
0
X

new posts
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### University open days

• University of the West of England, Bristol
Wed, 23 Jan '19
• University of East London
Wed, 23 Jan '19
• University of Gloucestershire
School of Education Open Day Postgraduate
Wed, 23 Jan '19

### Poll

Join the discussion

Remain (1621)
79.15%
Leave (427)
20.85%