<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 2:08 PM, Nathaniel Smith <span dir="ltr"><<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden <<a href="mailto:sturla.molden@gmail.com">sturla.molden@gmail.com</a>> wrote:<br>

> Haslwanter Thomas <<a href="mailto:Thomas.Haslwanter@fh-linz.at">Thomas.Haslwanter@fh-linz.at</a>> wrote:<br>
><br>
>> Personally I cannot think of many applications where it would be desired<br>
>> to calculate the standard deviation with ddof=0. In addition, I feel that<br>
>> there should be consistency between standard modules such as numpy, scipy, and pandas.<br>
><br>
> ddof=0 is the maxiumum likelihood estimate. It is also needed in Bayesian<br>
> estimation.<br>
<br>
</div>It's true, but the counter-arguments are also strong. And regardless<br>
of whether ddof=1 or ddof=0 is better, surely the same one is better<br>
for both numpy and scipy.<br>
<div class=""><br>
> If you are not eatimating from a sample, but rather calculating for the<br>
> whole population, you always want ddof=0.<br>
><br>
> What does Matlab do by default? (Yes, it is a retorical question.)<br>
<br>
</div>R (which is probably a more relevant comparison) does do ddof=1 by default.<br>
<div class=""><br>
>> I am wondering if there is a good reason to stick to "ddof=0" as the<br>
>> default for "std", or if others would agree with my suggestion to change<br>
>> the default to "ddof=1"?<br>
><br>
> It is a bad idea to suddenly break everyone's code.<br>
<br>
</div>It would be a disruptive transition, but OTOH having inconsistencies<br>
like this guarantees the ongoing creation of new broken code.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>This topic comes up regularly. The original choice was made for numpy 1.0b1 by Travis, see this <a href="http://thread.gmane.org/gmane.comp.python.numeric.general/25720/focus=25721">later thread.</a> At this point it is probably best to leave it alone.<br>
<br></div><div>Chuck<br></div><br></div></div></div>