Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
courses:cs211:winter2012:journals:jeanpaul:chaptersixsectioniii [2012/03/28 01:50] – [The Problem] mugabejcourses:cs211:winter2012:journals:jeanpaul:chaptersixsectioniii [2012/03/28 02:00] – [The Problem] mugabej
Line 8: Line 8:
 >>>>>>>>>>>>>>>>>> (x<sub>1</sub>y<sub>1</sub>),(x<sub>2</sub>y<sub>2</sub>),...,(x<sub>n</sub>y<sub>n</sub>), where x<sub>1</sub> < x<sub>2</sub>,...,< x<sub>n</sub>\\ >>>>>>>>>>>>>>>>>> (x<sub>1</sub>y<sub>1</sub>),(x<sub>2</sub>y<sub>2</sub>),...,(x<sub>n</sub>y<sub>n</sub>), where x<sub>1</sub> < x<sub>2</sub>,...,< x<sub>n</sub>\\
 >>>>>>>>>>>>>>>>>> Given a line L with equation y = ax + b, we say that an "error" of L with respect to P is the sum of all of its squared distances to the points in P:\\ >>>>>>>>>>>>>>>>>> Given a line L with equation y = ax + b, we say that an "error" of L with respect to P is the sum of all of its squared distances to the points in P:\\
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Error(L,P) = ∑<sub>i =1</sub><sup>n</sup> (y<sub>i</sub> - ax<sub>i</sub>- b) <sup>2</sup>\\+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Error(L,P) = ∑<sub> from i =1 to n</sub> (y<sub>i</sub> - ax<sub>i</sub>- b) <sup>2</sup>\\
 >>>>>>>>>>>>>>>>>> Thus naturally, we are bound to finding the line with minimum error.\\ >>>>>>>>>>>>>>>>>> Thus naturally, we are bound to finding the line with minimum error.\\
 +>>>>>>>>>>>>>>>>>> The solution turns out to be a line y = ax + b, where:\\ 
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> a = [(n∑<sub>i</sub> x<sub>i</sub>y<sub>i</sub>) - (∑<sub>i</sub>x<sub>i</sub>)(∑<sub>i</sub> y<sub>i</sub>)]/[(n∑<sub>i</sub> x<sub>i</sub><sup>2</sup>) - (∑<sub>i</sub> x<sub>i</sub>)<sup>2</sup>]\\ 
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> And b = (∑<sub>i</sub> y<sub>i</sub>- a∑<sub>i</sub> x<sub>i</sub>)/n\\
courses/cs211/winter2012/journals/jeanpaul/chaptersixsectioniii.txt · Last modified: 2012/03/28 02:39 by mugabej
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0