Sample autocovariance function
= Sample autocovariance function
{title2=$\widehat\gamma_n(h)$}
For a known zero mean, $\widehat\gamma_n(h)=n^{-1}\sum_{t=1}^{n-h}Y_tY_{t+h}$ for $0\le h<n$. <Weakly stationary process> assumptions give <expectation> $(1-h/n)\gamma(h)$. Dividing by $n-h$ instead gives an unbiased estimate at each individual lag, although the resulting collection need not form a positive semidefinite <covariance> sequence.