# [SciPy-dev] Statistics Review progress

Jonathan Taylor jonathan.taylor at stanford.edu
Fri Apr 14 13:47:23 CDT 2006

```the discussion of bias vs. unbiasedness depends on the degrees of
freedom in the "residuals" (and whether you are estimating the variance
(sigma^2) or the standard deviation (sigma)).

most (mathematical) stats books refer to unbiased estimates of sigma^2
as compared to the MLE estimate of sigma^2 (which has denominator n).

so, i think an integer flag something along the lines of "df=n-1" makes
a lot of sense because
that way, when estimating other standard errors (say the error from a
linear regression model), the flag would be the same and could be set
appropriately for these residuals.

just my \$0.02

-- jonathan

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.
>
> -- Ed
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev
>

--
------------------------------------------------------------------------
I'm part of the Team in Training: please support our efforts for the
Leukemia and Lymphoma Society!

http://www.active.com/donate/tntsvmb/tntsvmbJTaylor

GO TEAM !!!

------------------------------------------------------------------------
Jonathan Taylor                           Tel:   650.723.9230
Dept. of Statistics                       Fax:   650.725.8977
Sequoia Hall, 137                         www-stat.stanford.edu/~jtaylo
390 Serra Mall
Stanford, CA 94305

```