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

Fixed Math::DomainError with continuity correction #5

Closed
wants to merge 1 commit into from

Conversation

ankane
Copy link
Contributor

@ankane ankane commented Feb 22, 2021

Fixes #2

When p = 0 or p = 1, we don't need to calculate the square root, which could be negative and throw:

Math::DomainError: Numerical argument is out of domain - "sqrt"

Ref: https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval_with_continuity_correction

@ankane
Copy link
Contributor Author

ankane commented May 19, 2022

Cleaning up stale PRs

@ankane ankane closed this May 19, 2022
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

Successfully merging this pull request may close these issues.

sqrt error with low confidence
1 participant