Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted variance/std #1

Open
Jorge-C opened this issue Jan 6, 2014 · 0 comments
Open

Weighted variance/std #1

Jorge-C opened this issue Jan 6, 2014 · 0 comments

Comments

@Jorge-C
Copy link
Owner

Jorge-C commented Jan 6, 2014

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant