help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

autocov: divide by (n-1) not n


From: Sebastian Schubert
Subject: autocov: divide by (n-1) not n
Date: Sat, 09 Dec 2006 19:44:08 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux)

Hallo,

I'm quite new to statistics so this maybe complete nonsense or just a
matter of convention: I would change the division by n in autocov to
division by (n-i):

49 for i = 0 : h
50   retval(i+1, :) = diag (X(i+1:n, :).' * conj (X(1:n-i, :))).' / (n-i);
51 endfor

The autocovariance:
gamma(i-j) = <(a_i-A)(a_j-A)>
where <> is expectation value.  So one should divide the sum by the
number of its addends which is n-i.

Sebastian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]