[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Subject: Linear Regression / Linear Regression Slope Relationship



PureBytes Links

Trading Reference Links

Hi Harry

I'm totally lost with this mathematical jargon (which I admit is what I asked for), but there a
couple of lines of your post that make sense to me. They are...

b=the slope (Linear Regression Slope)

and

b=[(x1-xbar)(y1-ybar)+.......+(xn-xbar)(yn-ybar)]/
   [(x1-xbar)sq +......+(xn-xbar)sq]

Putting these two statements, can I assume that converting b correctly into MetaStock code will give
me an exact replica of the MFL Linear Regression Slope function?

If that's the case then I am indebted to you.

Regards

Roy

> 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 Links
>
>
>
>
>
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/