AbsoluteCorrelationFunction[data,hspec]
estimates the absolute correlation function at lags hspec from data.
AbsoluteCorrelationFunction[proc,hspec]
represents the absolute correlation function at lags hspec for the random process proc.
AbsoluteCorrelationFunction[proc,s,t]
represents the absolute correlation function at times s and t for the random process proc.
AbsoluteCorrelationFunction
AbsoluteCorrelationFunction[data,hspec]
estimates the absolute correlation function at lags hspec from data.
AbsoluteCorrelationFunction[proc,hspec]
represents the absolute correlation function at lags hspec for the random process proc.
AbsoluteCorrelationFunction[proc,s,t]
represents the absolute correlation function at times s and t for the random process proc.
Details
- AbsoluteCorrelationFunction is also known as the autocorrelation function.
- The following specifications can be given for hspec:
-
τ at time or lag τ {τmax} unit spaced from 0 to τmax {τmin,τmax} unit spaced from τmin to τmax {τmin,τmax,dτ} from τmin to τmax in steps of dτ {{τ1,τ2,…}} use explicit {τ1,τ2,…} - AbsoluteCorrelationFunction[{x1,…,xn},h] is equivalent to
. - When data is TemporalData containing an ensemble of paths, the output represents the average across all paths.
- AbsoluteCorrelationFunction for a process proc with value x[t] at time t is given by:
-
Expectation[x[s] x[t]] for a scalar-valued process Expectation[x[s]⊗x[t]] for a vector-valued process - The symbol ⊗ represents KroneckerProduct.
- AbsoluteCorrelationFunction[proc,h] is defined only if proc is a weakly stationary process and is equivalent to AbsoluteCorrelationFunction[proc,h,0].
- The process proc can be any random process such as ARMAProcess and WienerProcess.
Examples
open all close allBasic Examples (4)
Estimate the absolute correlation function at lag 2:
AbsoluteCorrelationFunction[{2, 3, 4, 3}, 2]Sample the absolute correlation function for a random sample from an autoregressive time series:
data = RandomFunction[ARProcess[{.2, .3, .4}, 1], {1, 10 ^ 4}];ListPlot[AbsoluteCorrelationFunction[data, {30}], Filling -> Axis, PlotRange -> All]The absolute correlation function for a discrete-time process:
AbsoluteCorrelationFunction[BinomialProcess[p], s, t]DiscretePlot3D[Evaluate[% /. {p -> 2 / 3}], {s, 0, 10}, {t, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]The absolute correlation function for a continuous-time process:
AbsoluteCorrelationFunction[WienerProcess[μ, σ], s, t]Plot3D[Evaluate[% /. {μ -> 1, σ -> 2}], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]Scope (13)
Empirical Estimates (7)
Estimate the absolute correlation function for some data at lag 5:
AbsoluteCorrelationFunction[Range[10], 5]Obtain empirical estimates of the correlation function up to lag 9:
AbsoluteCorrelationFunction[Range[10], {9}]Compute the absolute correlation function for lags 1 to 9 in steps of 2:
AbsoluteCorrelationFunction[Range[10], {1, 9, 2}]Compute the absolute correlation function for a time series:
ts = TemporalData[TimeSeries, {{{-2.9904395734335427, -1.5547517217370468, -2.007044987914736,
-0.7114933373063236, -1.5920036118254968, 0.23183536513859127, 0.056774681349179124,
0.32394041932443046, 0.10382798659711348, -0.684046765274114, - ... 1687325555,
3.410933732368106, 2.5200924558212163, 2.008558601261935, 0.43151331467691206,
0.6249727955196763}}, {{1, 1000, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> None}}, False, 10.1];The absolute correlation function of a time series for multiple lags is given as a time series:
abscorr = AbsoluteCorrelationFunction[ts, {100}]ListPlot[abscorr, Filling -> Axis]Estimate the absolute correlation function for an ensemble of paths:
data = RandomFunction[ARProcess[{.8}, 1], {0, 500}, 10]abscorr = AbsoluteCorrelationFunction[data, {12}];ListPlot[abscorr, Filling -> 0]Compare empirical and theoretical absolute correlation functions:
proc = MAProcess[{.4, .3, .5, .6, .3}, 1.];data = RandomFunction[proc, {0, 100}];ListPlot[AbsoluteCorrelationFunction[#, {10}]& /@ {proc, data}, Filling -> {1 -> {2}}, PlotStyle -> PointSize[Medium], PlotLegends -> {"process absolute correlation", "sample absolute correlation"}]Plot the absolute cross-correlation for vector data:
proc = ARProcess[{{{.3, .1}, {.6, .3}}}, {{1, .3}, {.3, .6}}];
data = RandomFunction[proc, {100}];
cov = AbsoluteCorrelationFunction[data, {-6, 6}];Table[ListPlot[cov["Values"][[All, i, j]], Filling -> 0, PlotLabel -> {i, j}], {i, 1, 2}, {j, 1, 2}]Random Processes (6)
The absolute correlation function for a weakly stationary discrete-time process:
AbsoluteCorrelationFunction[ARProcess[{a}, σ^2], s, t]DiscretePlot3D[Evaluate[% /. {a -> 2 / 3, σ -> 1}], {s, 0, 10}, {t, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]The absolute correlation function only depends on the antidiagonal
:
AbsoluteCorrelationFunction[ARProcess[{a}, σ^2], h]DiscretePlot[Evaluate[% /. {a -> 2 / 3, σ -> 1}], {h, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow", AxesLabel -> {h, None}]The absolute correlation function for a weakly stationary continuous-time process:
AbsoluteCorrelationFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], s, t]Plot3D[Evaluate[% /. {μ -> 1, σ -> 2, θ -> 1 / 3}], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]The absolute correlation function only depends on the antidiagonal
:
AbsoluteCorrelationFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], h]Plot[Evaluate[% /. {μ -> 1, σ -> 2, θ -> 1 / 3}], {h, 0, 10}, ColorFunction -> "Rainbow", Filling -> Axis, AxesLabel -> {h, None}]The absolute correlation function for a non-weakly stationary discrete-time process:
AbsoluteCorrelationFunction[BinomialProcess[p], s, t]DiscretePlot3D[Evaluate[% /. p -> 1 / 3], {s, 0, 10}, {t, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]The absolute correlation function depends on both time arguments:
antidiagonals = AbsoluteCorrelationFunction[BinomialProcess[1 / 3], t, t + h]DiscretePlot[Evaluate@Table[antidiagonals, {t, 1, 4}], {h, 0, 6}, ExtentSize -> 1 / 2, AxesLabel -> {h, None}, PlotLegends -> (Row[{"t =", #}]& /@ Range[1, 4])]The absolute correlation function for a non-weakly stationary continuous-time process:
AbsoluteCorrelationFunction[PoissonProcess[μ], s, t]Plot3D[Evaluate[% /. μ -> 3], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]The absolute correlation function depends on both time arguments:
antidiagonals = AbsoluteCorrelationFunction[PoissonProcess[3], t, t + h]Plot[Evaluate@Table[antidiagonals, {t, 1, 4}], {h, 0, 6}, AxesLabel -> {h, None}, PlotLegends -> (Row[{"t =", #}]& /@ Range[1, 4])]The correlation function for some time series processes:
proc1 = ARProcess[{.8}, 1];
proc2 = MAProcess[{-.4, -.7, .6, -1}, 1];
proc3 = SARMAProcess[{}, {}, {3, {.6}, {.1}}, 1];
proc4 = FARIMAProcess[{}, 1 / 3, {}, 1];DiscretePlot[AbsoluteCorrelationFunction[#, h], {h, 0, 15}, ExtentSize -> 1 / 2, PlotRange -> All, PlotLabel -> Head[#]]& /@ {proc1, proc2, proc3, proc4}Absolute cross-correlation plots for a vector ARProcess:
proc = ARProcess[{{{.3, .1}, {.6, .3}}}, {{1, .3}, {.3, .6}}];
cov = AbsoluteCorrelationFunction[proc, h];Table[DiscretePlot[cov[[i, j]], {h, -6, 6}, ExtentSize -> 1 / 2, PlotLabel -> {i, j}], {i, 1, 2}, {j, 1, 2}]Applications (2)
Determine whether the following data is best modeled with an MAProcess or an ARProcess:
ListLinePlot[data = TemporalData[TimeSeries, {{{-1.4735257611469446, -0.9158187257309729, -1.9060205147226934,
-1.6174582169404574, -2.633459084244463, -2.104839842098871, -2.8701276893108894,
-2.4118183939601607, -0.5125633448622677, -1.2356329399850385, 1. ... 26394036266876, -0.16380797769527589, 0.3559909972777121,
1.5343047104249412, 0.10763337590714506}}, {{0, 100, 1}}, 1, {"Continuous", 1},
{"Discrete", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1]]It is difficult to determine the underlying process from sample paths:
candidates = {MAProcess[{.5, .4}, 1], ARProcess[{.5, .4}, 1]};SeedRandom[2];
ListLinePlot[RandomFunction[#, {0, 100}]]& /@ candidatesThe absolute correlation function of the data decays slowly:
ListPlot[AbsoluteCorrelationFunction[data, {10}], Filling -> 0]ARProcess is clearly a better candidate model than MAProcess:
ListPlot[AbsoluteCorrelationFunction[#, {10}], PlotLabel -> Head[#], Filling -> 0]& /@ candidatesUse the absolute correlation function to determine if a process is mean ergodic:
proc = OrnsteinUhlenbeckProcess[0, σ, θ];The process is weakly stationary:
WeakStationarity[proc]Calculate the absolute correlation function:
abscorr[h_] = AbsoluteCorrelationFunction[proc, h]Find the value of the strip integral:
int[t_] = 1 / (2 * t)Integrate[(1 - Abs[u] / (2 * t))abscorr[u], {u, -2 * t, 2 * t}, Assumptions -> t > 0]Check if the limit of the integral is 0 to conclude mean ergodicity:
Limit[int[t], t -> ∞, Assumptions -> σ > 0 && θ > 0]Properties & Relations (13)
Sample absolute correlation function is a biased estimator for the process absolute correlation function:
proc = ARMAProcess[1, {5 / 6, -1 / 6}, {2 / 3}, 1];
paths = RandomFunction[proc, {0, n = 10}, 10 ^ 4];Calculate the sample absolute correlation function:
AbsoluteCorrelationFunction[paths, {10}]sacf = TimeSeriesMapThread[(#2(n + 1) / (n + 1 - #1))&, %]Absolute correlation function for the process:
acf = AbsoluteCorrelationFunction[proc, {10}]ListPlot[{sacf, acf}, Filling -> 0, PlotLegends -> {"sample absolute correlation", "process absolute correlation"}]Absolute correlation function for a list can be calculated using AbsoluteCorrelation:
data = Range[10];
n = Length[data];Calculate absolute correlation function for the data:
AbsoluteCorrelationFunction[data, {n - 1}] / (Range[n, 1, -1] / n)Table[ AbsoluteCorrelation[Drop[data, i], Drop[RotateRight[data, i], i]], {i, 0, n - 1}]% - %%AbsoluteCorrelationFunction is the off-diagonal entry in the absolute correlation matrix:
𝒫 = WienerProcess[μ, σ];AbsoluteCorrelation[𝒫[{s, t}], 1, 2]AbsoluteCorrelationFunction[𝒫, s, t]Simplify[%% - %, 0 < s < t]Sample absolute correlation function at lag 0 estimates the second Moment:
data = Range[10];
AbsoluteCorrelationFunction[data, 0]Moment[data, 2]% - %%Sample absolute correlation function is related to CovarianceFunction:
data = Range[10];
n = Length[data];AbsoluteCorrelationFunction[data - Mean[data], {n - 1}]CovarianceFunction[data, {n - 1}]% - %%Sample absolute correlation function is related to CorrelationFunction:
data = Range[10];
n = Length[data];AbsoluteCorrelationFunction[data - Mean[data], {n - 1}]% / First[%]Compare to the sample correlation function:
CorrelationFunction[data, {n - 1}]% - %%Use Expectation to calculate the absolute correlation function:
𝒫 = WienerProcess[μ, σ];Expectation[x[s] x[t], x𝒫, Assumptions -> s > 0 && t > 0]AbsoluteCorrelationFunction[𝒫, s, t]Simplify[% - %%, s < t]The absolute correlation function
is related to the Moment function:
𝒫 = GeometricBrownianMotionProcess[μ, σ, θ];AbsoluteCorrelationFunction[𝒫, t, t]Verify equality
, where
is the ![]()
moment function:
Moment[𝒫[t], 2]% - %%//SimplifyThe absolute correlation function
is related to the CovarianceFunction
:
𝒫 = WienerProcess[μ, σ];CovarianceFunction[𝒫, s, t]Verify equality
, where
is the mean function:
AbsoluteCorrelationFunction[𝒫, s, t] - Mean[𝒫[s]] Mean[𝒫[t]]% - %%The absolute correlation function equals CovarianceFunction when the mean of the process is zero:
AbsoluteCorrelationFunction[WienerProcess[], s, t]CovarianceFunction[WienerProcess[], s, t]% - %%The absolute correlation function is invariant for ToInvertibleTimeSeries:
proc = MAProcess[{2, 4}, 1];TimeSeriesInvertibility[proc]iproc = ToInvertibleTimeSeries@procAbsoluteCorrelationFunction[#, s, t]& /@ {proc, iproc}The absolute correlation function is not invariant to centralizing:
data = TemporalData[EventSeries, {{{-0.5997948200136711, -0.6119370022135471, -2.181570597470531,
-3.0852015062413294, -2.5597554304014736, -2.724339030053185, -2.1990400702572104,
-2.2335014895051946, -1.0488409388108924, -0.1005536745721749, 2 ... 63267114671374, 22.486986202712714, 21.766625417091756,
22.44341047189002, 22.079788501970878, 23.102713685532592}}, {{0, 100, 1}}, 1,
{"Continuous", 1}, {"Discrete", 1}, 1, {ResamplingMethod -> None, ValueDimensions -> 1}}, False,
10.1];Mean[data]newdata = Standardize[data, Mean, 1&];Compare absolute correlation functions:
ListPlot[AbsoluteCorrelationFunction[#, {20}], Filling -> 0]& /@ {data, newdata}PowerSpectralDensity is a transform of the absolute correlation function for mean zero processes:
proc = ARProcess[{a}, σ^2];
cf = AbsoluteCorrelationFunction[proc, h]Use FourierSequenceTransform with appropriate parameters:
ft = FourierSequenceTransform[cf, h, z]Compare to the power spectrum:
PowerSpectralDensity[proc, z]FullSimplify[% - ft]Possible Issues (1)
AbsoluteCorrelationFunction output may contain DifferenceRoot:
AbsoluteCorrelationFunction[ARProcess[{a, b}, σ^2], t] //Simplify[#, t > 0]&Use FunctionExpand to recover explicit powers:
%//FunctionExpandRelated Guides
History
Text
Wolfram Research (2012), AbsoluteCorrelationFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/AbsoluteCorrelationFunction.html.
CMS
Wolfram Language. 2012. "AbsoluteCorrelationFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AbsoluteCorrelationFunction.html.
APA
Wolfram Language. (2012). AbsoluteCorrelationFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AbsoluteCorrelationFunction.html
BibTeX
@misc{reference.wolfram_2026_absolutecorrelationfunction, author="Wolfram Research", title="{AbsoluteCorrelationFunction}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/AbsoluteCorrelationFunction.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_absolutecorrelationfunction, organization={Wolfram Research}, title={AbsoluteCorrelationFunction}, year={2012}, url={https://reference.wolfram.com/language/ref/AbsoluteCorrelationFunction.html}, note=[Accessed: 13-June-2026]}