[SciPy-dev] Statistics Review progress

Ed Schofield schofield at ftw.at
Thu Apr 13 05:10:42 CDT 2006


Travis Oliphant wrote:

> How about making the default minimize mean square error  --- i.e  
> division by N+1 for variance calculation  :-) 

Robert Kern wrote:
> I would implement varbiased() and var()
>
> def varbiased(a):
>   return var_with_flag(a, bias=True)
>
> def var(a):
>   return var_with_flag(a, bias=False)
>
> I *don't* want three versions of each of these functions.
>   

If we really want just one version for the three cases with denominators
(n-1), n, and (n+1), I suggest we get rid of the boolean bias flag and
make it an integer flag instead, taking either -1 (default), 0, or +1. 
A boolean flag would be clumsy, since it'd be true for both the n and
(n+1) cases, and we'd need yet another flag to distinguish between
these.  And, as others have pointed out, bias=False would be an
inaccurate description of the std function.

-- Ed




More information about the Scipy-dev mailing list