Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
CorrelationFunction
  • See Also
    • CovarianceFunction
    • AbsoluteCorrelationFunction
    • Correlation
    • PartialCorrelationFunction
    • Covariance
    • WeakStationarity
    • PowerSpectralDensity
  • Related Guides
    • Time Series Processing
    • Random Processes
    • Stochastic Differential Equation Processes
    • Time Series Processes
    • See Also
      • CovarianceFunction
      • AbsoluteCorrelationFunction
      • Correlation
      • PartialCorrelationFunction
      • Covariance
      • WeakStationarity
      • PowerSpectralDensity
    • Related Guides
      • Time Series Processing
      • Random Processes
      • Stochastic Differential Equation Processes
      • Time Series Processes

CorrelationFunction[data,hspec]

estimates the correlation function at lags hspec from data.

CorrelationFunction[proc,hspec]

represents the correlation function at lags hspec for the random process proc.

CorrelationFunction[proc,s,t]

represents the correlation function at times s and t for the random process proc.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Empirical Estimates  
Random Processes  
Applications  
Properties & Relations  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • CovarianceFunction
    • AbsoluteCorrelationFunction
    • Correlation
    • PartialCorrelationFunction
    • Covariance
    • WeakStationarity
    • PowerSpectralDensity
  • Related Guides
    • Time Series Processing
    • Random Processes
    • Stochastic Differential Equation Processes
    • Time Series Processes
    • See Also
      • CovarianceFunction
      • AbsoluteCorrelationFunction
      • Correlation
      • PartialCorrelationFunction
      • Covariance
      • WeakStationarity
      • PowerSpectralDensity
    • Related Guides
      • Time Series Processing
      • Random Processes
      • Stochastic Differential Equation Processes
      • Time Series Processes

CorrelationFunction

CorrelationFunction[data,hspec]

estimates the correlation function at lags hspec from data.

CorrelationFunction[proc,hspec]

represents the correlation function at lags hspec for the random process proc.

CorrelationFunction[proc,s,t]

represents the correlation function at times s and t for the random process proc.

Details

  • CorrelationFunction is also known as autocorrelation or cross-correlation function (ACF or CCF).
  • 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,…}
  • CorrelationFunction[{x1,…,xn},h] is equivalent to with =Mean[{x1,…,xn}].
  • When data is TemporalData containing an ensemble of paths, the output represents the average across all paths.
  • CorrelationFunction of the process proc is the CovarianceFunction c normalized by the outer product of the standard deviation function σ at times s and t:
  • c[s,t]/(σ[s]σ[t])for scalar-valued data or processes
    c[s,t]/(σ[s] ⊗ σ[t])for vector-valued data or processes
  • The symbol ⊗ represents KroneckerProduct.
  • CorrelationFunction[proc,h] is defined only if proc is a weakly stationary process and is equivalent to CorrelationFunction[proc,h,0].
  • The process proc can be any random process, such as ARMAProcess and WienerProcess.

Examples

open all close all

Basic Examples  (4)

Estimate the correlation function at lag 2:

The sample correlation function for a random sample from an autoregressive time series:

The correlation function for a discrete-time process:

The correlation function for a continuous-time process:

Scope  (13)

Empirical Estimates  (7)

Estimate the correlation function for some data at lag 9:

Obtain empirical estimates of the correlation function up to lag 9:

Compute the correlation function for lags 1 to 9 in steps of 2:

Compute the correlation function for a time series:

The correlation function of a time series for multiple lags is given as a time series:

Estimate the correlation function for an ensemble of paths:

Compare empirical and theoretical correlation functions:

Plot the cross-correlation for vector data:

Random Processes  (6)

The correlation function for a weakly stationary discrete-time process:

The correlation function only depends on the antidiagonal :

The correlation function for a weakly stationary continuous-time process:

The correlation function only depends on the antidiagonal :

The correlation function for a non-weakly stationary discrete-time process:

The correlation function depends on both time arguments:

The correlation function for a non-weakly stationary continuous-time process:

The correlation function depends on both time arguments:

The correlation function for some time series processes:

Cross-correlation plots for a vector ARProcess:

Applications  (2)

Determine whether the following data is best modeled with an MAProcess or an ARProcess:

It is difficult to determine the underlying process from sample paths:

The correlation function of the data decays slowly:

ARProcess is clearly a better candidate model than MAProcess:

Create an ACF plot with white-noise confidence bands:

Plot the correlation for lags 0 to 20 with 95% white-noise confidence bands:

Compare to uncorrelated white noise:

Properties & Relations  (12)

Sample correlation function is a biased estimator for the process correlation function:

Calculate the sample correlation function:

Correlation function for the process:

Plot both functions:

Correlation function for a process is the off-diagonal entry in the Correlation matrix:

Sample correlation at lag 0 is always 1:

Sample correlation function is related to CovarianceFunction:

Scaled sample covariance function:

Sample correlation function is related to AbsoluteCorrelationFunction:

Scale by the first element:

Compare to the sample correlation function:

Use Expectation to calculate correlation:

Define mean and standard deviation functions:

Correlation function for equal times reduces to 1:

Correlation function is related to the CovarianceFunction :

For , the standard deviation function is :

The correlation function is related to the Correlation:

It is the off-diagonal entry in the covariance matrix:

Correlation function is invariant for ToInvertibleTimeSeries:

Correlation function is invariant to centralizing:

The data has nonzero mean:

Centralize data:

Compare correlation functions:

Sum of the sample correlation function is constant:

The sample is random:

Calculate the sample correlation function from 1 to n-1:

Calculate the sum:

Possible Issues  (1)

CorrelationFunction output may contain DifferenceRoot:

Use FunctionExpand to recover explicit powers:

See Also

CovarianceFunction  AbsoluteCorrelationFunction  Correlation  PartialCorrelationFunction  Covariance  WeakStationarity  PowerSpectralDensity

Related Guides

    ▪
  • Time Series Processing
  • ▪
  • Random Processes
  • ▪
  • Stochastic Differential Equation Processes
  • ▪
  • Time Series Processes

History

Introduced in 2012 (9.0)

Wolfram Research (2012), CorrelationFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/CorrelationFunction.html.

Text

Wolfram Research (2012), CorrelationFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/CorrelationFunction.html.

CMS

Wolfram Language. 2012. "CorrelationFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CorrelationFunction.html.

APA

Wolfram Language. (2012). CorrelationFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CorrelationFunction.html

BibTeX

@misc{reference.wolfram_2025_correlationfunction, author="Wolfram Research", title="{CorrelationFunction}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CorrelationFunction.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_correlationfunction, organization={Wolfram Research}, title={CorrelationFunction}, year={2012}, url={https://reference.wolfram.com/language/ref/CorrelationFunction.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English