# Is it appropriate to model a time series by applying a linear regression using the moving average of the predictors?

I have a dataset of football (soccer) data, where for each player in a given season, I have the (fantasy football) points scored in a particular match, the opposition attacking and defensive strength for that match, and a number of other variables. For example:

I want to predict the points scored by a particular player in their next match - marked by the question mark in the picture above. We know the opposition strength already for the next match - each team has a strength calculated at the start of a season and it doesn't change. Therefore we don't need to forecast these values and can factor it into our prediction of the points that will be scored.

My initial idea was to do a simple regression (linear) for now, by taking a moving average of the past N matches (orange shade in pic below) and the opposition strength for the upcoming game (yellow) to predict the points that will be scored:

Such that for a given match we have the following dependent and independent variables:

The next sample would be taken by moving the window by 1 sample, and using the next match as the target:

I hope that this would also allow me to measure the correlation between the moving average of points and the target points - a measure of the "form" of a player i.e. how well their most recent performances predict their next performance controlling for the opposition difficulties.

1. Is this approach appropriate?

However, I've been having doubts mainly around whether this approach satisfies the conditions for regression:

1. Would the samples resulting from the sliding windows be truly independent?

Beyond that, I've also been wondering if a timeseries model would be more appropriate. From my initial reading it looks like timeseries models are traditionally univariate and it might be difficult to control for opposition strength in my prediction. It also seems like it would be difficult to measure "form" directly with a timeseries model as I propose for the regression.

1. Is it better to use a hybrid approach where I use a timeseries model to forecast the points for the next match and then input this to a regression with the opposition strength variables?

Any feedback or suggestions would be greatly appreciated. Thank you in advance for your time.

If you want to predict the points scored by a particular player, then you might either use a time series model or a linear regression or a combination of both, see https://otexts.com/fpp2/dynamic.html for and introduction to 'dynamic regression'.

A time series model uses values of the dependent variable of the past to predict future values. This can work when there is a time dependent pattern. For example, if a player improves with time, then there might be a trend in the time series which you can capture with a moving average model. However, past values do not predict future values. They can only be used as a proxy for independent variables that cause or correlate with future values but which you do not have.

Since you have data that can predict future scores, you should use. That is, apply a linear regression.

It is a different question whether you should transform your independent variables. It seems to be a bad idea to apply a moving average to those, because you mix values of different observations in an arbitrary way that is given by the order of the games.

Why should the score of a player given a particular opponent depent on the average strength of his recent oppenents? The score depends certainly on the strength of that oppenent. Whether it depends on the strength of past opponents is a different question and it depends on whether some sort of a training effect exists.

If you think, that such a training effect exists, then you might use the moving averages of your independent variables as additional features for your model but you need to be careful because they can be highly correlated to the original features.

If you still think, that there is some training or learning effect which your independent variables do not capture, then you might include different lags of a players scores, that is scores of past games, as features for your linear model and see if they have any significant effect.