PureBytes Links
Trading Reference Links
|
On 14 Aug 2004 13:57:04 -0000, "Roy Larsen" <rlarsen@xxxxxxxxxxxxxx>
wrote:
>>
>>Can anyone help with the mathematical relationship between Linear Regression and Linear Regression
>>Slope.
The formula for linear regression is:
y=a+bx+E
a=the intercept
b=the slope (Linear Regression Slope)
E=the error
normally you already have x and y. They are your paired data points.
You calculate b, then you estimate a (i.e., assume E=0).
Since I don't have symbols on my E-mail program, my definitions of
terms are as follows:
n=number of pair values (x and y)
x1=first value of x
xn=nth value of x
xbar=sample mean of the x values
sq=term squared
sqrt=square root of term
*=multiply
b=[(x1-xbar)(y1-ybar)+.......+(xn-xbar)(yn-ybar)]/
[(x1-xbar)sq +......+(xn-xbar)sq]
a=(ybar)-(b)(xbar)
You can calculate the linear regression with the trend () function in
Excel.
My statistics book reminded me that the slope by itself cannot tell
you how strongly correlated x and y are. For that you use the Pearson
correlation. In Excel, it is Pearson().
The formula for the Pearson correlation is:
r=[(x1-xbar)(y1-ybar)+.......+(xn-xbar)(yn-ybar)]/
[{(x1-xbar)sq +......+(xn-xbar)sq}sqrt * {(y1-ybar)sq
+......+(yn-ybar)sq}sqrt]
That is the easy part, Roy. I'll leave the MS coding to you!
Harry
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|