# Detecting outliers using correlogram

If there is an outlier in a time series, how does its correlogram behave? Is it possible to find outliers using a correlogram?

EDIT

I have such a Time series:

ts <- c(1,2,3,1,2,2,30,40,3,2,4,1,3,2,3,1,1,2)


its correlogram looks like this: I have an outlier in my time series, Is it possible to detect these outlier from correlogram?

Depends on the details, but in general think of each autocorrelation as close to the correlation of a series and itself lagged. An outlier adds two points to the corresponding scatter plot, as the outlier appears first as itself and second as a previous value. The net result will often be difficult to detect. I wouldn't expect a correlogram to be a useful way to detect outliers, certainly not compared with the usual plot of a series versus time.

EDIT It's difficult to know how seriously to take your example, but it does underline the point that outliers are more obvious on a time plot than in a correlogram.

• Thank you for your answer, I have edited my post :) in my time series I have two outlier. As you said, I should see two points. My question is now, where should I see these two points? could you please explain me with an example? – TangoStar Nov 25 '13 at 17:32
• Call your series y and itself lagged k observations Lk.y. Then the autocorrelation is (close to) the correlation between y and Lk.y. There is correspondingly a scatter plot of y and Lk.y. – Nick Cox Nov 25 '13 at 17:39
• Thanks alot for your explanation, I have produced the correlogram with acf function in r. as you said if there is an outlier, I should see two extreme point in the correlogram. In my example I cant see these two extreme point. Which charachtristic should have my time series thereby to see these two extreme points in its correlogram? – TangoStar Nov 26 '13 at 12:35
• I didn't say that and I didn't say it twice. The scatter plot referred to is a plot of your variable versus some previous value, not the correlogram. The entire burden of replies from @IrishStat and myself is that the correlogram does not unequivocally or reliably indicate outliers. – Nick Cox Nov 26 '13 at 12:51
• Not sure what you are now asking. That book unsurprisingly gives the same basic advice as you are getting. The only small point is that it is incorrect to imply that autocorrelations are always damped. If the true series were, in R terms, c(1,2,3,1,2,2,3,4,3,2,4,1,3,2,3,1,1,2) then your series with outliers gives some stronger autocorrelations. The advice that a correlogram 'may be seriously affected' does not mean that you can read off the effect of the outliers from the correlogram. – Nick Cox Nov 26 '13 at 13:14

Outliers affect the covariance and the variance. The acf is the ratio between the covariance and the variance. Since the variance is inflated, the acf is dampened by the outliers. Effectively, the true acf is masked by the outliers. This is why simple model identification schemes are just too simple.

• Sentence 3 doesn't follow from sentences 1 and 2, which are clearly correct. Because outliers can affect covariance too, the effect on autocorrelations can be both ways. Otherwise the tone of caution is wise. – Nick Cox Nov 26 '13 at 1:43
• @Nick I should have said the variance tends to be inflated more than the covariance thus the larger addend in the denomoinator leads to a smaller ratio (the acf).If you can help with a proof of this assertion that might help. – IrishStat Nov 26 '13 at 11:25
• I doubt you can prove that as you easily can find counterexamples in which outliers increase at least some autocorrelations. That remains the key point, that the effect of outliers is unpredictable. – Nick Cox Nov 26 '13 at 12:10