AI Glossary / Statistics and probability / Advanced
Correlation function
Definition
A correlation function describes how a statistical relationship varies across pairs of times, locations, or other index values. It extends a single association measure into a function of separation or position. Definitions differ across fields: some use an uncentered expected product, while statistical time-series analysis commonly uses a centered, normalized correlation coefficient. The convention must be stated before interpreting its values.
What it means
A single correlation coefficient can compare two measured variables. A correlation function can instead describe how today's value relates to values one day, two days, or many days away, or how measurements relate across spatial distances. Its pattern can reveal persistence, alternation, or repeated structure.
Autocorrelation concerns a process compared with itself; cross-correlation concerns two processes. A time lag or spatial distance organizes the comparisons. A large value is meaningful only in light of centering, normalization, units, and the assumptions about how the process varies across its index.
How it works
For a real-valued process X(t), one common random-process convention defines R(s,t) = E[X(s)X(t)], assuming the expectation exists. Its covariance function is C(s,t) = R(s,t) - E[X(s)]E[X(t)]. Dividing this covariance by the two standard deviations gives a normalized correlation when both variances are positive.
Under weak stationarity, the mean is constant and the covariance depends only on the time difference rather than the two times separately. One can then write C(h) for lag h and rho(h) = C(h)/C(0). The normalized autocorrelation has rho(0) = 1 and values between minus one and plus one. The uncentered R need not have either of those properties.
Estimate the relevant function from observations using a stated convention. Sample autocorrelation formulas differ in denominator adjustments and boundary treatment, especially at longer lags with fewer paired observations. Regular time spacing is assumed by many elementary formulas. Irregular observations need methods that respect their actual timing.
Inspect trends, seasonality, mean changes, and measurement effects before attributing a pattern to stable dependence. Cross-correlation lag signs must also be defined because software conventions can differ. A peak suggesting that one series leads another does not establish causation.
Use uncertainty methods appropriate to the process and estimation procedure. Many lag estimates are considered together, and their errors are not generally independent. A correlation function summarizes second-order relationships; it does not describe every form of dependence or the complete distribution in general.
Three practical examples
- A forecasting team inspects a demand series' autocorrelation across daily lags to investigate persistent and weekly patterns.
- A sensor analyst studies how readings relate across spatial separation before selecting a spatial model.
- An AI team examines autocorrelation in prediction residuals to detect time structure that its model has not captured.
Think of it this way
Think of sliding a transparent copy of a pattern across the original. At each shift, a summary records how the two line up. The resulting sequence describes alignment across shifts, but the numerical meaning depends on whether the overall level and scale were removed before comparison.
Worked example
Define a toy process X_t = 5 + epsilon_t + 0.5 epsilon_(t-1), where the epsilon values are independent and each is -1 or 1 with equal probability. Each epsilon has mean zero and variance one.
The process mean is five. Its variance is 1 + 0.5 squared = 1.25. Adjacent values share epsilon_t: X_t contains it with coefficient one, and X_(t+1) contains it with coefficient 0.5. Their covariance is therefore 0.5. Values separated by two or more steps share no epsilon and have covariance zero.
The normalized autocorrelation is rho(0) = 1, rho(1) = 0.5/1.25 = 0.4, and rho(h) = 0 for integer lags with absolute value at least two. Negative lags have the same values for this real stationary process.
Under the uncentered convention, R(0) = 25 + 1.25 = 26.25, R(1) = 25 + 0.5 = 25.5, and R(h) = 25 for larger absolute lags. The nonzero value twenty-five at long lags reflects the squared mean, not continuing covariance. This calculation illustrates why an unlabeled correlation-function value cannot always be interpreted as a Pearson coefficient.
Illustrative case study
Fictional case: Pine Sensors compares two reports about a stable simulated signal. One says the one-step correlation is 0.4, while another reports 25.5. The team initially suspects a software error.
A review shows that one program reports normalized, mean-centered autocorrelation and the other reports an expected-product function. Once the definitions and units are aligned, the results agree. The team updates its documentation and verifies the estimates on a process with known properties before applying the tools to operational sensor data with trends and missing observations.
Common misconceptions and mistakes
Do not assume every correlation function is bounded by one or equals one at zero lag. Those properties require the normalized convention. A constant offset changes the uncentered function but not a centered correlation. Zero autocorrelation does not generally imply independence, and a cross-correlation peak does not prove a causal delay. Trend or seasonality can also produce patterns that are not well described by a stationary model.
Business use
Correlation functions support forecasting, monitoring, signal analysis, and evaluation of sequential AI outputs. They help determine whether simple independent-observation assumptions are plausible and whether residual patterns remain. Record centering, scaling, lag direction, sampling interval, and missing-data handling. Interpret the function alongside the original series and the operational mechanisms that might create the observed pattern.
People also ask
Can the index be spatial rather than temporal?
Yes, correlation functions can describe relationships across locations.
What is the difference between covariance and correlation functions?
Under normalized usage, correlation divides covariance by the relevant standard deviations; some fields use correlation for the uncentered expected product instead.
Does a finite dataset reveal the population function exactly?
No; sample estimates have uncertainty and can be noisy at long separations.
Check your understanding
Why does the worked uncentered function remain twenty-five at large lags?
Answer: The process has mean five.
What is its lag-one normalized autocorrelation?
Answer: 0.4.
Why do covariance values vanish beyond lag one here?
Answer: The values no longer share any independent noise terms.
Related terms
- Autocorrelation function
- Covariance function
- Stochastic process
- cross-correlation
- weak stationarity
- lag
- spatial correlation
- power spectral density
Learn next
Compute centered and uncentered functions for the same series and compare their units. Then study stationarity, sample autocorrelation uncertainty, and the relationship between covariance patterns and spectral descriptions.
More in Statistics and probability
- Correlation - Correlation describes a statistical association between variables, often summarized by a coefficient indicating its direction and strength.
- Correlation coefficient - A correlation coefficient is a numerical summary of the direction and strength of a specified association between variables.
- Correlation does not imply causation - Correlation does not imply causation means that an observed statistical association, by itself, does not establish that changing one variable would change...
- Correlation matrix - A correlation matrix is a square table containing the pairwise correlation coefficients among a set of variables.
- Correlational measures - Correlational measures are statistics that summarize the degree and, where defined, direction of association between variables.
- Count data - Count data record how many events, objects, or observations occur within a defined unit, category, period, or amount of exposure.
Sources
Hossein Pishro-Nik, Introduction to Probability, Statistics, and Random Processes, Mean and Correlation Functions: https://www.probabilitycourse.com/chapter10/10_1_2_mean_and_correlation_functions.php NIST/SEMATECH e-Handbook, Autocorrelation: https://itl.nist.gov/div898/handbook/eda/section3/eda35c.htm
Previous: Correlation does not imply causation Next: Correlation matrix