Fitting quadratic and exponential functions to scatter plots