8000 variance is inaccurate for arrays of identical, large values (Trac #1098) · Issue #1696 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
variance is inaccurate for arrays of identical, large values (Trac #1098) #1696
Closed
@thouis

Description

@thouis

Original ticket http://projects.scipy.org/numpy/ticket/1098 on 2009-04-29 by @thouis, assigned to @charris.

Variance calculation is inaccurate for arrays of large, identical values:

from numpy import *
(ones(100000)10.0*20).var()
52756253943791624.0

There are more accurate algorithms for computing variance. One example from Welford (1962) is in the attached file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0