Email Record: Mathematical algorithms for linear regression