Computes best fit polynomials and correlation coefficients for a given dataset