[SciPy-dev] Statistics Review progress

Robert Kern robert.kern at gmail.com
Thu Apr 13 12:05:13 CDT 2006


Ed Schofield wrote:
> 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.

That would work for variance, but not for other quantities. If we really do want
to support more than two forms across several quantities in a uniform manner,
then enums are the way to specify them.

kind.Efficient
kind.MinMSE
kind.MaxLikelihood

-- 
Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Scipy-dev mailing list