Signal Processing Toolbox Previous page   Next Page

Bias and Normalization

An estimate of a quantity is biased if its expected value is not equal to the quantity it estimates. The expected value of the output of xcorr is

xcorr provides the unbiased estimate, dividing by N-|m|, when you specify an 'unbiased' flag after the input sequences.

Although this estimate is unbiased, the end points (near -(N-1) and N-1) suffer from large variance because xcorr computes them using only a few data points. A possible trade-off is to simply divide by N using the 'biased' flag:

With this scheme, only the sample of the correlation at zero lag (the Nth output element) is unbiased. This estimate is often more desirable than the unbiased one because it avoids random large variations at the end points of the correlation sequence.

xcorr provides one other normalization scheme. The syntax

divides the output by norm(x)*norm(y) so that, for autocorrelations, the sample at zero lag is 1.


Previous page  Correlation and Covariance Multiple Channels Next page

© 1994-2005 The MathWorks, Inc.