Path: news.mathworks.com!not-for-mail From: "shinchan " <shinchan75034@gmail.com> Newsgroups: comp.soft-sys.matlab Subject: Re: linear regression, X\Y vs. Y\X Date: Wed, 24 Jun 2009 23:07:01 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 21 Message-ID: <h1ubil$q9o$1@fred.mathworks.com> References: <gpe852$lsc$1@fred.mathworks.com> <gpf2no$hp5$1@fred.mathworks.com> Reply-To: "shinchan " <shinchan75034@gmail.com> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1245884821 26936 172.30.248.35 (24 Jun 2009 23:07:01 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Wed, 24 Jun 2009 23:07:01 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1524778 Xref: news.mathworks.com comp.soft-sys.matlab:550468 Hi Roger, I would like to know how to solve this using an eigenvectors as you mentioned. Do you mean that the eigenvalue is the constant term that project X to Y, i.e., the proportionality between X and Y? I am not sure how to conceptualize this into a eigenvector problem, or put it in Matlab code. Please help. Thansk. "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gpf2no$hp5$1@fred.mathworks.com>... > "KC " <kctung75034@gmail.com> wrote in message <gpe852$lsc$1@fred.mathworks.com>... > > I can't figure out why X\Y is not reciprocal of Y\X, given the following: > > > > X = [1 2 4 5 7 9 11 13 14 16]'; Y = [101 105 109 112 117 116 122 123 129 130]'; > > ........ > > I think what is bothering you, KC, is why you don't get the same (homogeneous) regression line in the two methods. If the one answer were the reciprocal of the other, then the two regression lines would be the same line. > > It should interest you to learn that there is only way these lines can be the same, and that is for all the given points to be colinear with some line through the origin; in other words all the x and y coordinates must be proportional. > > The two kinds of regression are based on differing assumptions. In the one it is assumed that all the errors lie in the x-coordinates, while the other kind assumes that all the errors are in the y-coordinates. It is therefore not surprising that one will obtain differing approximating lines. > > There is another method using eigenvectors which assumes that both x and y are subject to equal amounts of errors, and this produces yet a third line positioned between the other two. None of the three lines is the same except when the original data lies strictly along a line through the origin. > > Roger Stafford