I'm reading a time series analysis book and the formula for sample autocovariance is defined in the book as:
$\widehat{\gamma}(h) = n^{-1}\displaystyle\sum_{t=1}^{n-h}(x_{t+h}-\bar{x})(x_t-\bar{x})$
with $\widehat{\gamma}(-h) = \widehat{\gamma}(h)\;$ for $\;h = 0,1, ..., n-1$. $\bar{x}$ is the mean.
Can someone explain intuitively why we divide the sum by $n$ and not by $n-h$? The book explains the reason is, because the formula above is a non-negative definite function and so dividing by $n$ is preferred, but this doesn't explain this to me clear enough. Can someone maybe prove this or show example or something. I'm a bit confused x) To me the intuitive thing at first would be to divide by $n-h$. Is this an unbiased or biased estimator of autocovariance?
Thank you for any help =)