This gem adds methods to the Math module to aid in calculating the Least Squares Regression Line given two arrays.
Shane Emmons
gem "least_squares", "~> 0.1.0"