Skip to content

Do not throw error if alternativas have data that can lead to negative numbers for probability calculation - #703

Merged
andrehjr merged 2 commits into
mainfrom
check-if-alternatives-have-valid-data
Jan 22, 2023
Merged

Do not throw error if alternativas have data that can lead to negative numbers for probability calculation#703
andrehjr merged 2 commits into
mainfrom
check-if-alternatives-have-valid-data

Conversation

@andrehjr

@andrehjr andrehjr commented Jan 22, 2023

Copy link
Copy Markdown
Member

We stumbled on situation at work where we had a completed_count greater than participant_count.

When calculating the probability this can lead to negative numbers which are not valid input for Beta Distribution. So RubyStats throws an error right away.

I still need more info on when/how this happens. But the Dashboard should not blow up in any case because of this. So I'm adding this check.

@andrehjr
andrehjr force-pushed the check-if-alternatives-have-valid-data branch from eba5a64 to cfd61ac Compare January 22, 2023 21:26
@andrehjr
andrehjr merged commit 43b08a5 into main Jan 22, 2023
@andrehjr
andrehjr deleted the check-if-alternatives-have-valid-data branch January 22, 2023 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant