# Linear Regression or Spline Fit?

I have data with 2 variables: X - Area Size of a field, Y - Average Production Rate. I need to check the relation between the two. I have plotted the data, and got the following two graphs:

and

Now I have a dilemma. Should I fit a linear regression model, or should I take into account all the little fluctuations in the trend, as shows in the smoothed curve. Which model is better, linear regression or spline fit (which I am not too familiar with). Won't I get overfitting by using the spline model here?

• What questions are you trying to answer? In general these plots are very suboptimal: figures without labelled axes are next to impossible to interpreter. Commented Jan 14, 2017 at 15:06
• I didn't add values to the axis on purpose, I can't publish the data. I am trying to test if there is a relation (clearly there is), and to make predictions, if possible. Regression analysis. I just noticed the fluctuations. Commented Jan 14, 2017 at 15:20
• The issue of overfitting requires knowledge of sample size. There may be other alternative to consider such as nonlinear regression. You need to provide more details. Commented Jan 14, 2017 at 15:57
• The sample size is N=70. The mean of X is 92.1 with SD of 128, the mean of Y is 318,521 with SD of 475,588. The range of X is 552. If I fit a linear regression, I get an R squared of 0.8. Commented Jan 14, 2017 at 16:24
• If you cannot publish our data, you should publish plots of them either (annotated or not). Having said that, you do say that: "X - Area Size of a field, Y - Average Production Rate" in your first sentence already so we infer that much; I mostly ask for units and the overall modelling task. In any case, talk about the problem you try to solve. Generally speaking a spline seems overly flexible for an "area-to-production" relation but currently there is not enough information to do an informed suggestion. Commented Jan 15, 2017 at 0:59

Polynomials are notoriously bad at extrapolating trends. They are mathematically bound to go to $\pm \infty$ whereas our intuition of trends does not. This should be a cautionary tale for anyone considering splines for inference or prediction. Looking at your graphic, I am certain that is displaying overfitting, which applies to your question whether it is for inferential or predictive statistics.
In your comments you note you transform $Y$ to log and the trend is non-linear. It seems to me your visual inspection of these data is heavily weighted by the high influence/leverage points in the tails. It seems less than 5% of the data lie in the right 2/3rds of the graphic. I would suggest graphing these data with a log transform applied to the $X$ axis. If you would like to find a single polynomial function which relates $X$ to $Y$ in this graphic, consider the use of fractional polynomials, rather than fitting scads of models higgledy piggledy.