<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 10: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></blockquote><div><br></div><div>If we could still choose here without any costs, obviously that's true. This particular ship sailed a long time ago though. By the way, there isn't even a `scipy.stats.std`, so we're comparing with differently named functions (nanstd for example).<br>
</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">
> 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></blockquote><div><br></div><div>Not much of an argument to change return values for a so heavily used function.<br><br></div><div>Ralf<br><br></div><div><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-n<br>
<br>
--<br>
Nathaniel J. Smith<br>
Postdoctoral researcher - Informatics - University of Edinburgh<br>
<a href="http://vorpus.org" target="_blank">http://vorpus.org</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br></div></div>