Introduction
Cross-correlation analysis is an important statistical technique for examining the relationship between two variables when the relationship may occur at different time lags. Unlike ordinary correlation, which generally evaluates the relationship between two variables measured at the same observation point, cross-correlation investigates whether changes in one variable are associated with changes in another variable before or after a specific lag.
In biological, environmental and ecological studies, cross-correlation can be particularly useful for understanding relationships between species abundance and environmental factors such as rainfall, temperature, humidity or other climatic variables. In this example, Species A and rainfall are examined using cross-correlation analysis in PAST (Paleontological Statistics).
The analysis produces a correlation coefficient for each lag, together with a p-value indicating whether the observed correlation is statistically significant. The resulting cross-correlation plot provides a visual representation of positive and negative relationships across the selected lag range.
What is Cross-Correlation Analysis?
Cross-correlation analysis is a statistical method used to measure the strength and direction of the relationship between two time-dependent variables at different time lags. It is particularly useful for determining whether changes in one variable are associated with changes in another variable before or after a certain time interval.
The cross-correlation coefficient at lag can be expressed as:
where:
- = cross-correlation coefficient at lag
- = value of the first time series at time
- = value of the second time series at time
- = time lag
- = mean of the first time series
- = mean of the second time series
- = time or observation index
The cross-correlation coefficient generally ranges from −1 to +1. A value close to +1 indicates a strong positive association, whereas a value close to −1 indicates a strong negative association. A value close to 0 indicates little or no linear association at that particular lag.
Concept of Lag in Cross-Correlation
A major feature of cross-correlation analysis is the lag.
A lag of 0 represents the relationship between the two variables at the same observation period. Negative and positive lags represent shifted relationships between the two series according to the lag convention used by the software.
For ecological data, a strong correlation at a non-zero lag may suggest that changes in an environmental variable and biological response are not occurring simultaneously. However, cross-correlation alone does not establish causation. The biological meaning of positive and negative lags should therefore be interpreted using the actual sampling interval and the lag convention used in PAST.
Cross-Correlation Analysis in PAST
PAST can be used to calculate cross-correlations between two numerical series over a selected range of lags. The output contains three major columns:
| Output | Meaning |
|---|---|
| Lag | Shift between the two time series |
| Correlation | Cross-correlation coefficient at that lag |
| p | Statistical significance of the correlation |
For this analysis, the cross-correlation was examined from lag −30 to +30, providing 61 lag positions.
Using the commonly applied significance level of p < 0.05, correlations with p-values below 0.05 were considered statistically significant.
Results of Cross-Correlation Analysis
The analysis shows a strong oscillating cross-correlation pattern between Species A and rainfall. The correlation coefficient changes repeatedly from positive to negative values across the lag range.
At lag 0, the correlation was r = 0.459, with p = 0.0002254, indicating a statistically significant moderate positive association between Species A and rainfall at the same observation period.
The strongest positive correlation occurred at lag −26, where the correlation was r = 0.79963 and p = 1.4076 × 10⁻⁸. Other prominent positive peaks occurred at lags −14, −2, +10 and +22.
The strongest negative correlation occurred at lag +4, with r = −0.69277 and p = 3.3011 × 10⁻⁹. Other strong negative relationships occurred around lags −20, −8, +16 and +28.
Table 1. Important Cross-Correlation Results
| Lag | Correlation (r) | p-value | Interpretation |
| −26 | 0.79963 | 1.4076 × 10⁻⁸ | Strong positive |
| −20 | −0.68508 | 1.0802 × 10⁻⁶ | Strong negative |
| −14 | 0.79615 | 3.7327 × 10⁻¹¹ | Strong positive |
| −8 | −0.68723 | 1.8374 × 10⁻⁸ | Strong negative |
| −2 | 0.79425 | 1.0093 × 10⁻¹³ | Strong positive |
| 0 | 0.45900 | 2.254 × 10⁻⁴ | Moderate positive |
| +4 | −0.69277 | 3.3011 × 10⁻⁹ | Strong negative |
| +10 | 0.78182 | 2.0544 × 10⁻¹¹ | Strong positive |
| +16 | −0.69238 | 1.9233 × 10⁻⁷ | Strong negative |
| +22 | 0.78019 | 7.7061 × 10⁻⁹ | Strong positive |
| +28 | −0.69099 | 1.1973 × 10⁻⁵ | Strong negative |
The repeated peaks demonstrate that the relationship is not simply a single positive or negative association. Instead, the cross-correlation pattern appears to have a cyclic or periodic structure.
Significant and Non-Significant Results
Across the 61 evaluated lag positions, most lag-specific correlations were statistically significant at the 5% level.
Table 2. Summary of Significance
| Result category | Number of lags | Criterion |
| Significant | 50 | p < 0.05 |
| Not significant | 11 | p ≥ 0.05 |
| Total lags evaluated | 61 | −30 to +30 |
Some lags showed weak relationships and were not statistically significant. For example, lag −29 had r = 0.1185, p = 0.5255, while lag +13 had r = −0.013693, p = 0.92721. These results provide little evidence of a meaningful linear association at those particular lags.
Cross-Correlation Plot

The supplied PAST output demonstrates a repeating wave-like pattern. Positive correlation peaks reach approximately 0.78–0.80, while negative troughs reach approximately −0.69.
Figure 1. Cross-correlation plot showing the relationship between Species A and rainfall across lags −30 to +30.
The blue and red curves show the variation of the cross-correlation-related output across the lag sequence. The repeated peaks and troughs provide visual evidence of a periodic relationship.
Interpretation of the Cross-Correlation Pattern
The most important feature of the result is the regular alternation between positive and negative correlations. Strong positive peaks occur approximately at −26, −14, −2, +10 and +22, which are separated by approximately 12 lag units. Strong negative troughs occur around −20, −8, +4, +16 and +28, also showing an approximately 12-lag separation.
This pattern suggests that the association between Species A and rainfall has a recurrent temporal structure. The alternating positive and negative correlations may indicate that the two variables respond in a repeating cycle.
The statistically significant correlation at lag 0 also indicates that Species A and rainfall are associated at the same observation period. However, the stronger correlations observed at several non-zero lags suggest that the relationship may also involve delayed or shifted temporal patterns.
The actual biological interpretation depends on the sampling frequency. For example, if one lag represents one month, a 12-lag pattern could correspond approximately to an annual cycle. If one lag represents a week, the same pattern would represent a different temporal cycle. Therefore, the lag unit must be clearly stated in a research article or thesis.
Important Statistical Consideration
A statistically significant cross-correlation should not automatically be interpreted as evidence that rainfall causes changes in Species A. Time-series variables can show significant correlations because of seasonality, trends, autocorrelation or other common environmental influences.
Therefore, cross-correlation analysis is best interpreted together with biological knowledge, time-series plots, seasonal analysis and, where appropriate, additional statistical modelling.
Conclusion
The cross-correlation analysis performed in PAST revealed a strong and statistically significant temporal association between Species A and rainfall across several lag positions. At lag 0, a moderate positive correlation was observed (r = 0.459, p = 0.0002254). The strongest positive association occurred at lag −26 (r = 0.79963, p = 1.4076 × 10⁻⁸), while the strongest negative association occurred at lag +4 (r = −0.69277, p = 3.3011 × 10⁻⁹).
The repeated positive and negative peaks at approximately 12-lag intervals indicate a pronounced cyclic pattern. Overall, the findings suggest that the relationship between Species A and rainfall varies systematically across time lags rather than remaining constant.
For ecological interpretation, the sampling interval and PAST lag convention should be considered carefully before describing one variable as leading or influencing the other. Cross-correlation provides valuable evidence of temporal association, but additional analyses are required to establish biological mechanisms or causality.



