

Can't be done.


Yeh i tried with triangles too but the numbers didnt fit, strange how close the correlation coefficient is to the angle of the least squares though, atleast to the eye. like it might be a 34" theta and draw a 40" theta line. It does seem to diminish the straighter the line though ughh. With values about 1 the angle seems to bear more resemblance. 1500 on the x and y is 1 gradient per x and gives 45", 1250 is 0.5 gradient and gives 23", i guess thats just a perfect example though. Well damnnnn.
I thought there might be some abstract solution :/ 


i had a function for counting digits and multiplying out didnt work either, i was guessing its the proportionality of the x given they're positive integers, doing the standard deviation on the Y axis normalizes to some extent, well in some cases almost exactly it depends on the length used for the x, the larger the x the less accurate the inverse arctan of the coefficient. Ive got rads to degree's and degree's to rads also, from my looking your switching rads to degree's but the arctan is still tiny. arctan finds the length given the angle but you somehow have to quantify the axis to fully normalize it, given there's no absolute scale its either a ratio or an exponential but neither worked for me. I'll try arctan(0.00005)*180/pi, arctan takes rads and gives rads and your multiplying by rads again. Let me check.
Your using degreestorads where i use radstodegress. double radstodegrees(double val){ //This function converts radians to degrees //6.2 / 360 gives 0.0172 which is the unit ratio to degree's double units = 0; double rads = 3.14169266; double degrees = 180; double deguse = 0; deguse = (val / rads) * 180; return deguse; } double degreestorads(double val){ //This one turns degrees into radians double units = 0; double rads = 3.14169266; double degrees = 180; double deguse = 0; units = (rads / degrees); deguse = units * val; return deguse; }


Does anyone know how to get the angle from the line of best fit. The arctan of the gradient is tiny and im not sure how to make the x and the y axis proportionate.
Conversely the correlation coefficient arctan inverted seems to be very close. The only difference is one is covariance over x variance ^ 2 while the coefficient is the covariance over standard dev X * standard dev Y. the deviations are rooted and obviously account for the Y axis but the angle still isnt a perfect fit, infact the straighter the line the less accurate i think and the length of X used.
Anyone got a quick fix??