Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Andrew Ng is explaining linear regression and the cost function, and why we want to minimize Theta(1).

However, he says that when Theta(1) = 1 then our slope of the line is (x,y) = (1,1), (2,2), (3,3).

I don't understand how he computes that slope? I don't understand how to figure this out? How do you know that the slope of the line is that?

http://cl.ly/image/1J1n2E151k2n

For example, what happens when Theta(1) = 2, how would i figure out the slope?

====

For more detail, you can see: https://class.coursera.org/ml-2012-002/lecture/index, at 2:30 he mentions that if Theta(1) = 1, then the slope of the line is: (1,1), (2,2), (3,3), or http://cl.ly/image/1J1n2E151k2n

share|improve this question
Because this question makes no sense without the background provided by the link--and not everyone will have the time or interest to sit through it--please explain the context and the meaning of the notation. – whuber Aug 27 '12 at 15:11
Thanks @whuber updated to add context. I'm a newbie to stats, so I'm not sure if this you enough information. – Kamilski81 Aug 27 '12 at 15:18

2 Answers

up vote 1 down vote accepted

It is not θ$_1$ that is minimized , it is the sum of squared errors that is minimized. Ng is fitting an equation either of the form Y=θ$_1$X. Note that the other link does not connect properly. When θ$_1$=1 the line is Y=X. θ$_1$ is the slope and that is why it goes through the points (1,1) (2,2) etc. Now if the slope θ$_1$=2 then the line would go through the points (1,2) (2,4) (3,6) etc.

share|improve this answer
Thanks. How do you type Theta on a Mac, any idea? I know option o comes out to ø?? – Kamilski81 Aug 28 '12 at 16:15

I just learned that in this example, ø(0) is the y-intercept and that ø(1) is the slope of the line.

Thus if ø(1) = 2, then the coordinates will be (1,2), (2,4), (3,6)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.