[SciPy-Dev] stats.sem default ddof
Thu Jun 24 07:44:03 CDT 2010
On Thu, Jun 24, 2010 at 7:41 AM, Angus McMorland <firstname.lastname@example.org> wrote:
> Hi all,
> I had a look at the stats.sem docstring this morning, and noticed that
> the default value for the ddof argument is 1. While this might be the
> most commonly used value for SEM, the default in numpy.std is 0, and
> I'd thought I'd see whether you think consistency or ease-of-use is
> the rule to follow here.
>From what I remember, SEM is supposed to have one denominator with n
and one with (n-1).
I think that's the standard normalization for the t-test
>>> import numpy as np
>>> from scipy import stats
>>> x = np.random.randn(20)
>>> stats.ttest_1samp(x, 0)
> I can't remember (and my laptop battery is about to go flat) but I'm
> guessing that the rewritten stats.nanstd will have ddof=0 as the
> ... I've also just noticed that stats.tsem doesn't have the usual ddof
> and axis keywords at all - I think this should be changed.
> I can file tickets if we think that's the way to go.
> AJC McMorland
> Post-doctoral research fellow
> Neurobiology, University of Pittsburgh
> SciPy-Dev mailing list
More information about the SciPy-Dev