having fun in javascript with linear regression and a few other things. could be more accurate though..