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

Should the newton-coates work with an infinite support distribution? #25

Closed
jlperla opened this issue Sep 28, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@jlperla
Copy link
Contributor

commented Sep 28, 2018

The docs had the following, which I removed:

If nodes are given, it will calculate using Newton-Coates quadrature (e.g. Trapezoidal)

x = -10:0.2:10
f(x) = x^2
E = expectation(dist, x)
3 * E(f) == 3 * E * f.(x)

But is that valid? the dist in that case was a Normal. If that works, then I think we need to be more careful and reject if the bounds don't match, etc.

@arnavs

This comment has been minimized.

Copy link
Member

commented Dec 2, 2018

@jlperla How about a check that the bounds include a minimum amount of probability mass? i.e., we have some keyword argument mass = 0.99 that we check against.

@jlperla

This comment has been minimized.

Copy link
Contributor Author

commented Dec 3, 2018

No, just check the support(dist) in the Newton Coates code. If one side is infinity or minus infinity, then throw an error

arnavs added a commit that referenced this issue Dec 3, 2018

@arnavs

This comment has been minimized.

Copy link
Member

commented Dec 3, 2018

OK, done in the above commit.

@arnavs arnavs closed this Dec 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.