
In
signal processing
Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing '' signals'', such as sound, images, and scientific measurements. Signal processing techniques are used to optimize transmissions, ...
, cross-correlation is a
measure of similarity of two series as a function of the displacement of one relative to the other. This is also known as a ''sliding
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
'' or ''sliding inner-product''. It is commonly used for searching a long signal for a shorter, known feature. It has applications in
pattern recognition
Pattern recognition is the automated recognition of patterns and regularities in data. It has applications in statistical data analysis, signal processing, image analysis, information retrieval, bioinformatics, data compression, computer graphic ...
,
single particle analysis,
electron tomography,
averaging,
cryptanalysis, and
neurophysiology
Neurophysiology is a branch of physiology and neuroscience that studies nervous system function rather than nervous system architecture. This area aids in the diagnosis and monitoring of neurological diseases. Historically, it has been dominated b ...
. The cross-correlation is similar in nature to the
convolution
In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution' ...
of two functions. In an
autocorrelation
Autocorrelation, sometimes known as serial correlation in the discrete time case, is the correlation of a signal with a delayed copy of itself as a function of delay. Informally, it is the similarity between observations of a random variable ...
, which is the cross-correlation of a signal with itself, there will always be a peak at a lag of zero, and its size will be the signal energy.
In
probability
Probability is the branch of mathematics concerning numerical descriptions of how likely an Event (probability theory), event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and ...
and
statistics, the term ''cross-correlations'' refers to the
correlations between the entries of two
random vectors and
, while the ''correlations'' of a random vector
are the correlations between the entries of
itself, those forming the
correlation matrix of
. If each of
and
is a scalar random variable which is realized repeatedly in a
time series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. E ...
, then the correlations of the various temporal instances of
are known as ''autocorrelations'' of
, and the cross-correlations of
with
across time are temporal cross-correlations. In probability and statistics, the definition of correlation always includes a standardising factor in such a way that correlations have values between −1 and +1.
If
and
are two
independent
Independent or Independents may refer to:
Arts, entertainment, and media Artist groups
* Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s
* Independe ...
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the p ...
s with
probability density function
In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample (or point) in the sample space (the set of possible values taken by the random variable) c ...
s
and
, respectively, then the probability density of the difference
is formally given by the cross-correlation (in the signal-processing sense)
; however, this terminology is not used in probability and statistics. In contrast, the
convolution
In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution' ...
(equivalent to the cross-correlation of
and
) gives the probability density function of the sum
.
Cross-correlation of deterministic signals
For continuous functions
and
, the cross-correlation is defined as:
which is equivalent to
where
denotes the
complex conjugate
In mathematics, the complex conjugate of a complex number is the number with an equal real part and an imaginary part equal in magnitude but opposite in sign. That is, (if a and b are real, then) the complex conjugate of a + bi is equal to a - ...
of
, and
is called ''displacement'' or ''lag.'' For highly-correlated
and
which have a maximum cross-correlation at a particular
, a feature in
at
also occurs later in
at
, hence
could be described to ''lag''
by
.
If
and
are both continuous periodic functions of period
, the integration from
to
is replaced by integration over any interval