# Bonferroni for outlier detection?

I am reading a book on time series analysis and I am having problems understanding the section about outlier detection.

The authors say that when you want to know whether at a certain time $T$ there was an outlier, you should use a certain test statistic and a test with size less than $\alpha$. But when you don't know where an outlier could be and you have a time series of size $n$ then you should use the same test statistic for each point but you should use tests of size $\alpha/n$. They say that this is an application of the conservative Bonferroni correction.

I just don't understand this. Doesn't this mean that there will be lots of outliers that you detect in short time series but don't detect in large ones? After all, spam filters don't have stronger spam criteria for people with more incoming email, right?

• Welcome to the site. The question has little to do with time series, so I added a few other tags. To do accurate multiple comparison analysis, you would need to divide by some sort of effective sample size, which will be lower for (positively) correlated time series. Bonferroni will likely be too conservative, so in a way what you say may be true. There likely to be time-series-specific methods of outlier detection that work around this difficulty. – StasK Sep 6 '11 at 18:24

• When I keep the ordinary size of, say, $\alpha=0.05$, no matter how many elements there are in the series, then I will get more and more false positives when the time series grows. Then I could perhaps check whether there are too many positives and could build a hypothesis test based on the number of positives but that would only tell me, that there might be outliers somewhere, not at which time. ... – frank Sep 7 '11 at 9:35
• (continuing from above): But to find outliers, I think it would be just wrong to divide by $n$ because that way I would fail to detect more and more outliers, just by growing my time series. It's the same with spam filters: no email provider is strengthening the spam criteria for people with more email only to keep the number of false positives from increasing. When you have more mail, you have more false positives. ... – frank Sep 7 '11 at 9:49