In probability and statistics, given two stochastic processes <math>\left\{X_t\right\}</math> and <math>\left\{Y_t\right\}</math>, the cross-covariance is a function that gives the covariance of one process with the other at pairs of time points. With the usual notation <math>\operatorname E</math> for the expectation operator, if the processes have the mean functions <math>\mu_X(t) = \operatorname \operatorname E[X_t]</math> and <math>\mu_Y(t) = \operatorname E[Y_t]</math>, then the cross-covariance is given by
:<math>\operatorname{K}_{XY}(t_1,t_2) = \operatorname{cov} (X_{t_1}, Y_{t_2}) = \operatorname{E}[(X_{t_1} - \mu_X(t_1))(Y_{t_2} - \mu_Y(t_2))] = \operatorname{E}[X_{t_1} Y_{t_2}] - \mu_X(t_1) \mu_Y(t_2).\,</math>
Cross-covariance is related to the more commonly used cross-correlation of the processes in question.
In the case of two random vectors <math>\mathbf{X}=(X_1, X_2, \ldots , X_p)^{\rm T}</math> and <math>\mathbf{Y}=(Y_1, Y_2, \ldots , Y_q)^{\rm T}</math>, the cross-covariance would be a <math>p \times q</math> matrix <math>\operatorname{K}_{XY}</math> (often denoted <math>\operatorname{cov}(X,Y)</math>) with entries <math>\operatorname{K}_{XY}(j,k) = \operatorname{cov}(X_j, Y_k).\,</math> Thus the term cross-covariance is used in order to distinguish this concept from the covariance of a random vector <math>\mathbf{X}</math>, which is understood to be the matrix of covariances between the scalar components of <math>\mathbf{X}</math> itself.
In signal processing, the cross-covariance is often called cross-correlation and is a measure of similarity of two signals, commonly used to find features in an unknown signal by comparing it to a known one. It is a function of the relative time between the signals, is sometimes called the sliding dot product, and has applications in pattern recognition and cryptanalysis.
Cross-covariance of random vectors
Cross-covariance of stochastic processes
The definition of cross-covariance of random vectors may be generalized to stochastic processes as follows:
Definition
Let <math>\{ X(t) \}</math> and <math>\{ Y(t) \}</math> denote stochastic processes. Then the cross-covariance function of the processes <math>K_{XY}</math> is defined by:
|cellpadding= 6
|border
|border colour = #0073CF
|background colour=#F5FFFA
where <math>\mu_X(t) = \operatorname{E}\left[X(t)\right]</math> and <math>\mu_Y(t) = \operatorname{E}\left[Y(t)\right]</math>.
If the processes are complex-valued stochastic processes, the second factor needs to be complex conjugated:
:<math>\operatorname{K}_{XY}(t_1,t_2) \stackrel{\mathrm{def{=}\ \operatorname{cov} (X_{t_1}, Y_{t_2}) = \operatorname{E} \left[ \left( X(t_1)- \mu_X(t_1) \right) \overline{\left( Y(t_2)- \mu_Y(t_2) \right)} \right]</math>
Definition for jointly WSS processes
If <math>\left\{X_t\right\}</math> and <math>\left\{Y_t\right\}</math> are a jointly wide-sense stationary, then the following are true:
:<math>\mu_X(t_1) = \mu_X(t_2) \triangleq \mu_X</math> for all <math>t_1,t_2</math>,
:<math>\mu_Y(t_1) = \mu_Y(t_2) \triangleq \mu_Y</math> for all <math>t_1,t_2</math>
and
:<math>\operatorname{K}_{XY}(t_1,t_2) = \operatorname{K}_{XY}(t_2 - t_1,0)</math> for all <math>t_1,t_2</math>
By setting <math>\tau = t_2 - t_1</math> (the time lag, or the amount of time by which the signal has been shifted), we may define
:<math>\operatorname{K}_{XY}(\tau) = \operatorname{K}_{XY}(t_2 - t_1) \triangleq \operatorname{K}_{XY}(t_1,t_2)</math>.
The cross-covariance function of two jointly WSS processes is therefore given by:
which is equivalent to
:<math>\operatorname{K}_{XY}(\tau) = \operatorname{cov} (X_{t+\tau}, Y_{t}) = \operatorname{E}[(X_{t+ \tau} - \mu_X)(Y_{t} - \mu_Y)] = \operatorname{E}[X_{t+\tau} Y_t] - \mu_X \mu_Y</math>.
Uncorrelatedness
Two stochastic processes <math>\left\{X_t\right\}</math> and <math>\left\{Y_t\right\}</math> are called uncorrelated if their covariance <math>\operatorname{K}_{\mathbf{X}\mathbf{Y(t_1,t_2)</math> is zero for all times.
