Skip to content

Weighted variance/std #1

Description

@Jorge-C

The current implementation works in our case, but we should refactor it (replace mean_and_std(... with std(a, weights=None, mean=None)) so that

  1. It's easier to use on its own
  2. Mean computation can still be reused (API similar to the new py3.4 statistics module)
  3. Make clear that dividing a weighted variance by n-1 doesn't give you an unbiased estimator (see 1, 2, 3). I think that for integer weights and ddof=0 the current approach is OK, though.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions