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

Wrong answers from integralBinomialPDF for p = 0.0 and p = 1.0 #97

Open
gaurav-arya opened this issue Feb 24, 2025 · 0 comments
Open

Wrong answers from integralBinomialPDF for p = 0.0 and p = 1.0 #97

gaurav-arya opened this issue Feb 24, 2025 · 0 comments

Comments

@gaurav-arya
Copy link

For example, integralBinomialPDF 3 1 3 = 2.718281828459045. The issue seems to be that the edge-case handling in integralBinomialLogPdf outputs the actual PDF rather than the log PDF:

| p == 0.0 && xI == 0 = 1.0
| p == 0.0 = 0.0
| p == 1.0 && xI == nI = 1.0
| p == 1.0 = 0.0
| xI == 0 = n * log (1-p)
| xI == nI = n * log p
.

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

1 participant