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

variance_mc #15

Open
kcarloni opened this issue Dec 2, 2022 · 2 comments
Open

variance_mc #15

kcarloni opened this issue Dec 2, 2022 · 2 comments

Comments

@kcarloni
Copy link

kcarloni commented Dec 2, 2022

Hi, thanks for your work on this package!

Is the calculation of the mc variance correct? (Line 137)
variance_mc = (sum(Jsf.^2)/ncalls - integral_mc^2) / (ncalls - 1) + eps()

I think it should be
variance_mc = (sum(Jsf.^2)/ncalls - integral_mc^2) * ncalls/(ncalls - 1) + eps()

to implement Bessel's correction properly.

@ranjanan
Copy link
Owner

ranjanan commented Jan 4, 2023

Check Equation 6 from https://arxiv.org/pdf/2009.05112.pdf?

@kcarloni
Copy link
Author

Hi, thanks for your reply. I agree the implementation matches the paper -- I think that equation 6 might itself be wrong, but it does make sense to stay consistent with the published version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants