Tuesday, October 28, 2008

Regression Analysis


If you don't know what this means, you're missing out!

Regression analysis is a statistical method that allows you (among other things) to determine how well a set of variables can predict another set of variables. There are all sorts of caveats and conditions, but I've been spending a lot of time figuring out how it works.

If you only have one set of dependent variables and one set of independent variables, then the formula is:

beta[x]=(sum((xi-avg[X])*(yi-avg[Y]))/sum((xi-avg[x])^2)

and

intercept = avg[Y]-(beta[X]/avg[X])

Then any new x variable can be multiplied by beta[x] and then added to the intercept, and that gives you your predicted value of y.

Simple huh?

No comments: