# Forecasting temperature using CurveFitting

I am assigned with a academic task to forecast temperature using CurveFitting.

Please suggest me whether I use Linear regression/ Non-Linear regression or extrapolation? I have to forecast 1 next week (days from 16 to 23) temperature.

 days=[1:15];

temp=[34    36    38    35    36    37    40    41    39    40    41    38  39    42    40];


I have searched over the internet but couldn't found solution for it so I thought someone could be possibly helping me out here.

I am a beginner so please keep patience with blunders. :)

## 1 Answer

Your assignment probably is only to manifest your skills using that kinds of regression. So, try applying both and compare results as for the significance of terms (t-statistics of coefficients), adjusted R squared or Bayesian Information Criterion. However, practically, time series methods would be more appropriate.

• Please have a look at the updated image and tell me I am going good with extrapolation. – Faisal Ashfaq May 24 '14 at 18:49
• The linear is fine. The other apparently is quadratic curve, which is practically unfeasible for such a long forecast period, unless there is a prior information on such behaviour or theoretical grounds for it. – Germaniawerks May 25 '14 at 12:03