A Complete Introduction To Time Series Analysis (with R):: Best Linear Predictor (Part I)

Hair Parra
Analytics Vidhya
Published in
7 min readOct 16, 2020

--

The form of the best linear predictor

In chapter 5 of this article series, we found that the best predictor of the n+h-th lag is given by the conditional expectation of X_{n+h} given X_{n}, that is

or extending to using all observations X_{1}, X_{2}, … , X_{n} , we can predict X_{n+h} by the conditional expectation of X_{n+h} given X_{1}, …, X_{n}. Further, we found that the actual form of this expectation when using only the last observation is given by

where, in the case that X_{n} were stationary this further simplified to

In this article, we will further explore a more precise and clear representation by using once more the principles of calculus optimization and linear algebra. Let’s jump into it!

The Projector Operator

Note that that the formula for the stationary case for predicting X_{n+h} given X_{n} is a (rather boring) linear combination. We would like to extend this to the case in which we use all observations X_{1}, X_{2}, …, X_{n}, say by finding some coefficients a_{0}, a_{1}, …, a_{n}, that is

, where P_{n} is called the projection operator. But how can we find these coefficients? Just as we did before, we will attempt to minimize the MSE of P_{n}X_{n+h} (prediction) and…

--

--

Hair Parra
Analytics Vidhya

Data Scientist & Data Engineer. CS, Stats & Linguistics graduate. Polyglot.