In the analysis of data, acorrelogram is achart ofcorrelation statistics. For example, intime series analysis, a plot of the sampleautocorrelations versus (the time lags) is anautocorrelogram. Ifcross-correlation is plotted, the result is called across-correlogram.
The correlogram is a commonly used tool for checkingrandomness in adata set. If random, autocorrelations should be near zero for any and all time-lag separations. If non-random, then one or more of the autocorrelations will be significantly non-zero.
In addition, correlograms are used in themodel identification stage forBox–Jenkinsautoregressive moving averagetime series models. Autocorrelations should be near-zero for randomness; if the analyst does not check for randomness, then the validity of many of the statistical conclusions becomes suspect. The correlogram is an excellent way of checking for such randomness.
Inmultivariate analysis,correlation matrices shown ascolor-mapped images may also be called "correlograms" or "corrgrams".[1][2][3]
The correlogram can help provide answers to the following questions:[4]
Randomness (along with fixed model, fixed variation, and fixed distribution) is one of the four assumptions that typically underlie all measurement processes. The randomness assumption is critically important for the following three reasons:
wheres is thestandard deviation of the data. Although heavily used, the results from using this formula are of no value unless the randomness assumption holds.
If the data are not random, this model is incorrect and invalid, and the estimates for the parameters (such as the constant) become nonsensical and invalid.
The autocorrelation coefficient at lagh is given by
wherech is theautocovariance function
andc0 is thevariance function
The resulting value ofrh will range between −1 and +1.
Some sources may use the following formula for the autocovariance function:
Although this definition has lessbias, the (1/N) formulation has some desirable statistical properties and is the form most commonly used in the statistics literature. See pages 20 and 49–50 in Chatfield for details.
In contrast to the definition above, this definition allows us to compute in a slightly more intuitive way. Consider the sample, where for. Then, let
We then compute the Gram matrix. Finally, is computed as the sample mean of theth diagonal of. For example, theth diagonal (the main diagonal) of has elements, and its sample mean corresponds to. Thest diagonal (to the right of the main diagonal) of has elements, and its sample mean corresponds to, and so on.
In the same graph one can draw upper and lower bounds for autocorrelation with significance level:
If the autocorrelation is higher (lower) than this upper (lower) bound, the null hypothesis that there is no autocorrelation at and beyond a given lag is rejected at a significance level of. This test is an approximate one and assumes that the time-series isGaussian.
In the above,z1−α/2 is the quantile of thenormal distribution; SE is the standard error, which can be computed byBartlett's formula for MA(ℓ) processes:
In the example plotted, we can reject thenull hypothesis that there is no autocorrelation between time-points which are separated by lags up to 4. For most longer periods one cannot reject thenull hypothesis of no autocorrelation.
Note that there are two distinct formulas for generating the confidence bands:
1. If the correlogram is being used to test for randomness (i.e., there is notime dependence in the data), the following formula is recommended:
whereN is thesample size,z is thequantile function of thestandard normal distribution and α is thesignificance level. In this case, the confidence bands have fixed width that depends on the sample size.
2. Correlograms are also used in the model identification stage for fittingARIMA models. In this case, amoving average model is assumed for the data and the following confidence bands should be generated:
wherek is the lag. In this case, the confidence bands increase as the lag increases.
Correlograms are available in most general purpose statistical libraries.
Correlograms:
Corrgrams:
This article incorporatespublic domain material from the National Institute of Standards and Technology