Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-06 Thread Bruce Southey
Bruce Southey wrote: > Alan McIntyre wrote: >> On Thu, Jun 5, 2008 at 10:16 PM, Keith Goodman <[EMAIL PROTECTED]> >> wrote: >> >>> How can that lead to instability? If the last half-million values are >>> small then they won't have a big impact on the mean even if they are >>> ignored. The varia

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-06 Thread Bruce Southey
Alan McIntyre wrote: > On Thu, Jun 5, 2008 at 10:16 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > >> How can that lead to instability? If the last half-million values are >> small then they won't have a big impact on the mean even if they are >> ignored. The variance is a mean too (of the squar

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Alan McIntyre
On Thu, Jun 5, 2008 at 10:16 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > How can that lead to instability? If the last half-million values are > small then they won't have a big impact on the mean even if they are > ignored. The variance is a mean too (of the squares), so it should be > stable t

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Charles R Harris
On Thu, Jun 5, 2008 at 7:55 PM, Alan McIntyre <[EMAIL PROTECTED]> wrote: > On Thu, Jun 5, 2008 at 9:06 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > > On Thu, Jun 5, 2008 at 4:54 PM, Christopher Marshall > > Are you worried that the mean might overflow on the intermediate sum? > > I suspect (but

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Keith Goodman
On Thu, Jun 5, 2008 at 6:55 PM, Alan McIntyre <[EMAIL PROTECTED]> wrote: > On Thu, Jun 5, 2008 at 9:06 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: >> On Thu, Jun 5, 2008 at 4:54 PM, Christopher Marshall >> Are you worried that the mean might overflow on the intermediate sum? > > I suspect (but ple

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Alan McIntyre
On Thu, Jun 5, 2008 at 9:06 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > On Thu, Jun 5, 2008 at 4:54 PM, Christopher Marshall > Are you worried that the mean might overflow on the intermediate sum? I suspect (but please correct me if I'm wrong, Christopher) he's asking whether there's cases wher

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Keith Goodman
On Thu, Jun 5, 2008 at 4:54 PM, Christopher Marshall <[EMAIL PROTECTED]> wrote: > I will be calculating the mean and variance of a vector with millions of > elements. > > I was wondering how well numpy's mean and variance functions handle the > numerical stability of such a calculation. How's th

[Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-05 Thread Christopher Marshall
I will be calculating the mean and variance of a vector with millions of elements. I was wondering how well numpy's mean and variance functions handle the numerical stability of such a calculation. ___ Numpy-discussion mailing list Numpy-discussion@sci