New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
numpy.cov() and numpy.var() default bias are inconsistent (numpy 1.9.2) #5835
Comments
Yes. I don't know what we can do about that at this point. This issue is probably best discussed on the mailing list. |
I'd like to suggest that this is worth fixing, painful though it would be. I think the best default for both is If someone wants an unbiased estimator instead, they should ask for it by providing That means changing the behavior of As a first step, how about adding a future warning to At the same time, can I suggest deprecating Saying the same thing a different way, if what I want is a simple descriptive statistic, it's strange to ask for a biased estimator. |
That seems to be true (summary usage data from here):
Unfortunately I don't think we can do that. We could deprecate the function and add a new one (which would be painful), but we should definitely not change the behaviour of the current function - that would silently change numerical results and make currently valid code wrong. We try never to do that; a |
@rgommers Yeah, "never break valid code" is a pretty good rule. How about a warning if you call |
That does seem like a reasonable thing to do. Better than deprecating |
cov() uses a bias of 1 by default.
var() uses a bias of 0 by default.
Such that
will only print the second line.
The text was updated successfully, but these errors were encountered: