Calculate R Squared

R 2 = N x y x y [ N x 2 ( x ) 2 ] [ N y 2 ( y ) 2 ]