Different programs implement variance in different ways. This can lead to confusing results when you move from one set of functions to another.
scipy.stats.cov() normalizes by (N-1), by default, bias=False. By setting bias=True, you will normalize by N.
However, scipy.var() normalizes by N.
In Octave, var( x, 0 ) biases by N-1, and var( x, 1 ) biases by N.
Matlab and R, I think, do things slightly differently.
Thursday, October 7, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment