## Is there a general method of determining the line of best fit for any given set of data? [closed]

Is there a general method of determining the line of best fit (using the principle of least squares or any other principle) for any given set of data points$? If there is no general method, what is/are the next best options? This problem is motivated by the difficulty in deciding which curve will best fit a given data set. If the data is roughly linear, I can use linear regression. If the data shows a quadratic behavior, I can guess that a quadratic curve will best fit the data and according I will try to find the best quadratic fit. But if the data show no particular trend of if it has a trend which I am not able to determine by simple observation, it is difficult to guess which model will best fit the data. For example, using linear or quadratic regression on a data that has the hidden pattern$y=x^{2.5}\ln x$(which is difficult to guess) is not effective. Hence I am looking for general a method of regression using least squares or any other principle that will work for all kinds of data. - Would that really give a line of best fit?$\;\;\$ – Ricky Demer Jan 17 2012 at 4:43
This question seems a little too broad, considering there is a whole field devoted to it. You might want to read en.wikipedia.org/wiki/Curve_fitting if you haven't already. – William DeMeo Jan 17 2012 at 5:09
Is the purpose of such methods to find an inherent trend in the data? What if...the data is just inherently trendless?(!) – Timothy Foo Jan 17 2012 at 9:30