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

Poisson distribution support #1770

Open
krishvishal opened this issue Sep 7, 2023 · 3 comments
Open

Poisson distribution support #1770

krishvishal opened this issue Sep 7, 2023 · 3 comments

Comments

@krishvishal
Copy link

The λ parameter of Poisson is only defined for positive reals. But here its defined for λ >= 0.

Is this intended?

dist = Poisson(0); #no problem

dist = Poisson(-1) #ERROR: DomainError with -1.0: (as intended)
@simsurace
Copy link
Contributor

What's the problem with Poisson(0)?

@krishvishal
Copy link
Author

Poisson(0) makes the mass concentrated at zero, and turns into Dirac.

And also multiple textbooks define the rate parameter λ to be positive real.

Ref:

  1. A Modern Introduction to Probability and Statistics - page 163, section11.5
  2. https://en.wikipedia.org/wiki/Poisson_distribution - Definition section
  3. Bertsekas and Tsitisklis - Section 2.3

@simsurace
Copy link
Contributor

Sure, if you want a proper (non-degenerate) Poisson distribution, you have to choose a positive parameter, but the same could be said about many other distributions, e.g. Bernoulli(p)as p->0. Many of those have limits (edge cases) which are still valid distribution. In numerical applications, it would be bad if the limit throws an error even though the limit is a perfectly valid distribution. For example, you may have a model where λ = exp(x) and for very negative x this can underflow.

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