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

weightedmean() returns NaN ± 0? #130

Open
Fenyutanchan opened this issue Nov 18, 2022 · 1 comment
Open

weightedmean() returns NaN ± 0? #130

Fenyutanchan opened this issue Nov 18, 2022 · 1 comment

Comments

@Fenyutanchan
Copy link

weightedmean([1 ± 0, 1 ± 0]) returns NaN ± 0, but 1 ± 0 is expected. Could you give me a better solution? Thank you very much.

@giordano
Copy link
Member

The explanation of what happens is simple: the weights are proportional to the inverse of the variances, so that 0-errors would result in NaN. I'm not sure what's the best solution, apart from special-casing 0, but also how? Do you have any concrete suggestion of how to address this problem?

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

2 participants