

Using two independent variables x 1 and x 2.

Oil price data, in this case, will show p-order autocorrelation where p is the lag time for this effect.Īutocorrelation may also be caused by an incorrectly specified regression model. Prices for oil may rise due to under-supply or increased demand, which results in increased production, which has a delayed effect in price reductions, which in turn may result in decreased production, etc. Sometimes an event takes time to have an effect. Thus, it is common for time series data to exhibit autocorrelation. Then after some bad news, prices may continue to fall. In the case of stock market prices, there are psychological reasons why prices might continue to rise day after day until some unexpected event occurs. We now give some of the reasons for the existence of autocorrelation. The predicted values in range F4:F14 are calculated by the array formula =TREND(D4:D14,B4:C14) and the residuals in range G4:G14 are calculated by the array formula =D4:D14-F4:F14. The predicted Yield values are shown in column F and the Residuals are shown in column G. Observation: Since another assumption for linear regression is that the mean of the residuals is 0, it follows thatĬov( e i, e j) = E = EĪnd so data is autocorrelated if E for some i ≠ j.Įxample 1: Find the first-order autocorrelation for the regression of rainfall and temperature on crop yield for the data in range A3:D14 of Figure 1. In general, p-order autocorrelation occurs when residuals p units apart are correlated. We say that the data is autocorrelated (or there exists autocorrelation) if cov( e i, e j) ≠ 0 for some i ≠ j.įirst-order autocorrelation occurs when consecutive residuals are correlated. for all i ≠ j, cov( e i, e j) = 0.ĭefinition 1: The autocorrelation (aka serial correlation) between the data is cov( e i, e j). One of the assumptions of linear regression is that there is no autocorrelation between the residuals, i.e. When performing multiple linear regression using the data in a sample of size n, we have n error terms, called residuals, defined by e i = y i – ŷ i.
