# How do I predict a time series with the help of other forecast time series?

If I have $n$ measured and interdependent time series $M_1, M_2, M_3..., M_n$ and have $n-1$ forecast time series $P_1, P_2, P_3..., P_{n-1}$, how can I predict the last forecast time series $P_n$?

Background: Me and some friends are avid river swimmers and we would like to forecast the water temperature. I have logged the past water temperature along with air temperature, wind conditions and solar radiation for the last couple of years. I also have access to the forecast of all these other parameters.

What I know so far is to filter out seasonality by only operating on the difference from the averages of the historical measurements.

But I lack the the mathematical knowledge to now generate a model which predicts the last time series. Can you give me some indication on what is left to do?

The result is ideally a model which given the past data, current conditions and other parameters forecasts for a given time in the future, gives me the water temperature for this point in the future.

• A series is a set of observations, not a single observation. It sounds as if you have just a single series for water temperature and single series for other predictive variables. The detail on temperature for swimming still leaves this as a very general question, how to predict a time series given various predictors? There are probably hundreds of books on time series and forecasting and there is no easy way to digest the advice there for you. By the way, it is not obvious to me that you should remove seasonality, even if you add it back in later. – Nick Cox Jun 22 '15 at 9:43
• Is it possible for you to give an example dataset? – Zhubarb Jun 22 '15 at 13:40
• Please post the example dataset. – forecaster Jun 22 '15 at 13:44
• Generally speaking there is no correct way to do this. Make assumptions which you consider to be valid and go from there. It's unusual to use forecasts to make predictions - but it might be a reasonable thing to do. I'd only be able to tell you what to do after I had a look at what the data looks like. The advice I got from my stats professor was 'always plot the data first'. – ACE Jun 26 '15 at 18:25

If you want to forecast one time series (water temperature) based not only on its previous values but also on another time series (eg air temperature), you should try linear regression with ARIMA errors. Here is a good start: https://www.otexts.org/fpp/9/1

• here is another paper written by me and my colleague that looks simpler that regression-ARIMA (r-package is also provided). Note the word moving average in this paper points to residuals not white noise. arxiv.org/abs/1412.5870 – TPArrow Jun 26 '15 at 9:39

I guess there are many ways to tackle your problem, but in general predicting physical conditions is a very difficult problem. However, if you still wanted to use Machine Learning to solve it these would be the frist two attempts that I would try:

First of all, you will need a lot of past-data and just to make it clear you want to predict let's say the next $d$ days given the $x$ previous days (where $d$ is a reasonable value). In both cases, apart from the weather data I would add the month of the year as a one-of-K parameter in my dataset. (this means you will have a vector of 12 zeros and you will fill a one at the corresponding month).

1) Autoregressive integrated moving average (ARIMA) model

ARIMA models are indisputably some of the most powerful moving average model used in statistics and econometrics for time-series prediction. If it can forecast financial time-series then it will fit your case as well.