Thread: Math problem
View Single Post
Old 07-03-2007, 01:49 PM  
Rhesus
Confirmed User
 
Join Date: Aug 2004
Posts: 2,009
Quote:
Originally Posted by woj View Post
well, I can get you the "formulas" but really, implementing the formulas involves writing an algorithm to solve this problem... even with simple non-weighted case, you can't just magically get the answer, you have to build an algorithm to solve it...
I mean to get an equation like this one (for non-weighted cases):

a = ( [sum](i=1 to N) (x[i] - x[mean]) (y[i] - y[mean]) ) / ( [sum](i=1 to N) (x[i] - x[mean])^2

Annoying I have to resort to this kind of notation.

Naturally you need an algorithm to calculate the sums, means, etc but an equation like the one above is what I'm looking for. The rest I can do myself.
Rhesus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote