Skip to main content
added 6 characters in body
Source Link
T. Tim
  • 47
  • 1
  • 5

Autocorrelation is the cross-correlation of a signal with itself, and autocovariance is the cross-covariance of a signal with itself.

According to https://www.mathworks.com/help/signal/ug/correlation-and-covariance.html the cross-correlation two wide-sense stationary random process, $x(n)$ and $y(n)$ is :

$R_{xy}(m) = E\{x(n+m)y(n) \}$

whereas the cross-covariance is defined as:

$C_{xy}(m) = E\{(x(n+m)-\mu_x) (y(n)-\mu_y) \} = R_{xy}(m) - \mu_x\mu_y$

However, scipystatsmodels https://www.statsmodels.org/stable/_modules/statsmodels/tsa/stattools.html calls in its function for the autocorrelation (acf) the autocovariance function (acovf):

avf = acovf(x, unbiased=unbiased, demean=True, fft=fft, missing=missing)

where acovf subtracts the mean since demean is set to True.

xo = x - x.mean()

But according to the definition, the cross-correlation is simply the dot product without subtracting the mean. What am I not getting here?

Autocorrelation is the cross-correlation of a signal with itself, and autocovariance is the cross-covariance of a signal with itself.

According to https://www.mathworks.com/help/signal/ug/correlation-and-covariance.html the cross-correlation two wide-sense stationary random process, $x(n)$ and $y(n)$ is :

$R_{xy}(m) = E\{x(n+m)y(n) \}$

whereas the cross-covariance is defined as:

$C_{xy}(m) = E\{(x(n+m)-\mu_x) (y(n)-\mu_y) \} = R_{xy}(m) - \mu_x\mu_y$

However, scipy https://www.statsmodels.org/stable/_modules/statsmodels/tsa/stattools.html calls in its function for the autocorrelation (acf) the autocovariance function (acovf):

avf = acovf(x, unbiased=unbiased, demean=True, fft=fft, missing=missing)

where acovf subtracts the mean since demean is set to True.

xo = x - x.mean()

But according to the definition, the cross-correlation is simply the dot product without subtracting the mean. What am I not getting here?

Autocorrelation is the cross-correlation of a signal with itself, and autocovariance is the cross-covariance of a signal with itself.

According to https://www.mathworks.com/help/signal/ug/correlation-and-covariance.html the cross-correlation two wide-sense stationary random process, $x(n)$ and $y(n)$ is :

$R_{xy}(m) = E\{x(n+m)y(n) \}$

whereas the cross-covariance is defined as:

$C_{xy}(m) = E\{(x(n+m)-\mu_x) (y(n)-\mu_y) \} = R_{xy}(m) - \mu_x\mu_y$

However, statsmodels https://www.statsmodels.org/stable/_modules/statsmodels/tsa/stattools.html calls in its function for the autocorrelation (acf) the autocovariance function (acovf):

avf = acovf(x, unbiased=unbiased, demean=True, fft=fft, missing=missing)

where acovf subtracts the mean since demean is set to True.

xo = x - x.mean()

But according to the definition, the cross-correlation is simply the dot product without subtracting the mean. What am I not getting here?

added 26 characters in body
Source Link
T. Tim
  • 47
  • 1
  • 5

Autocorrelation is the cross-correlation of a signal with itself, and autocovariance is the cross-covariance of a signal with itself.

According to https://www.mathworks.com/help/signal/ug/correlation-and-covariance.html the cross-correlation for non complex seriestwo wide-sense stationary random process, $x(n)$ and $y(n)$ is defined as :

$R_{xy}(m) = E\{x(n+m)y(n) \}$

whereas the cross-covariance is defined as:

$C_{xy}(m) = E\{(x(n+m)-\mu_x) (y(n)-\mu_y) \} = R_{xy}(m) - \mu_x\mu_y$

However, scipy https://www.statsmodels.org/stable/_modules/statsmodels/tsa/stattools.html calls in its function for the autocorrelation (acf) the autocovariance function (acovf):

avf = acovf(x, unbiased=unbiased, demean=True, fft=fft, missing=missing)

where acovf subtracts the mean since demean is set to True.

xo = x - x.mean()

But according to the definition, the cross-correlation is simply the dot product without subtracting the mean. What am I not getting here?

Autocorrelation is the cross-correlation of a signal with itself, and autocovariance is the cross-covariance of a signal with itself.

According to https://www.mathworks.com/help/signal/ug/correlation-and-covariance.html the cross-correlation for non complex series is defined as :

$R_{xy}(m) = E\{x(n+m)y(n) \}$

whereas the cross-covariance is defined as:

$C_{xy}(m) = E\{(x(n+m)-\mu_x) (y(n)-\mu_y) \} = R_{xy}(m) - \mu_x\mu_y$

However, scipy https://www.statsmodels.org/stable/_modules/statsmodels/tsa/stattools.html calls in its function for the autocorrelation (acf) the autocovariance function (acovf):

avf = acovf(x, unbiased=unbiased, demean=True, fft=fft, missing=missing)

where acovf subtracts the mean since demean is set to True.

xo = x - x.mean()

But according to the definition, the cross-correlation is simply the dot product without subtracting the mean. What am I not getting here?

Autocorrelation is the cross-correlation of a signal with itself, and autocovariance is the cross-covariance of a signal with itself.

According to https://www.mathworks.com/help/signal/ug/correlation-and-covariance.html the cross-correlation two wide-sense stationary random process, $x(n)$ and $y(n)$ is :

$R_{xy}(m) = E\{x(n+m)y(n) \}$

whereas the cross-covariance is defined as:

$C_{xy}(m) = E\{(x(n+m)-\mu_x) (y(n)-\mu_y) \} = R_{xy}(m) - \mu_x\mu_y$

However, scipy https://www.statsmodels.org/stable/_modules/statsmodels/tsa/stattools.html calls in its function for the autocorrelation (acf) the autocovariance function (acovf):

avf = acovf(x, unbiased=unbiased, demean=True, fft=fft, missing=missing)

where acovf subtracts the mean since demean is set to True.

xo = x - x.mean()

But according to the definition, the cross-correlation is simply the dot product without subtracting the mean. What am I not getting here?

Source Link
T. Tim
  • 47
  • 1
  • 5

Auto-correlation vs Auto-covariance

Autocorrelation is the cross-correlation of a signal with itself, and autocovariance is the cross-covariance of a signal with itself.

According to https://www.mathworks.com/help/signal/ug/correlation-and-covariance.html the cross-correlation for non complex series is defined as :

$R_{xy}(m) = E\{x(n+m)y(n) \}$

whereas the cross-covariance is defined as:

$C_{xy}(m) = E\{(x(n+m)-\mu_x) (y(n)-\mu_y) \} = R_{xy}(m) - \mu_x\mu_y$

However, scipy https://www.statsmodels.org/stable/_modules/statsmodels/tsa/stattools.html calls in its function for the autocorrelation (acf) the autocovariance function (acovf):

avf = acovf(x, unbiased=unbiased, demean=True, fft=fft, missing=missing)

where acovf subtracts the mean since demean is set to True.

xo = x - x.mean()

But according to the definition, the cross-correlation is simply the dot product without subtracting the mean. What am I not getting here?