Describe the bug
In split-4.0.0.pre, the dashboard page fails with an exception due to splitrb passing invalid parameters to BetaDistribution.
To Reproduce
I haven't got a small reproduction case, but it is obvious what is happening. Within Split::Experiment#calc_beta_params:
conversions == 1.
- We have some alternative where
alternative.participant_count == 0.
- Under these conditions:
alpha = 1 + conversions so alpha == 1 + 1 == 2.
beta = 1 + alternative.participant_count - conversions so beta == 1 + 0 - 1 == 0
- In
#calc_simulated_conversion_rates, beta is passed to RubyStats::BetaDistribution.
BetaDistribution#initialize requires beta > 0 and raises an exception.
Assuming there is no bug in the logic here, a good resolution might be to only call experiment.calc_winning_alternatives within dashboard/views/_experiment.erb if it will succeed.
Describe the bug
In
split-4.0.0.pre, the dashboard page fails with an exception due to splitrb passing invalid parameters to BetaDistribution.To Reproduce
I haven't got a small reproduction case, but it is obvious what is happening. Within Split::Experiment#calc_beta_params:
conversions == 1.alternative.participant_count == 0.alpha = 1 + conversionssoalpha == 1 + 1 == 2.beta = 1 + alternative.participant_count - conversionssobeta == 1 + 0 - 1 == 0#calc_simulated_conversion_rates,betais passed toRubyStats::BetaDistribution.BetaDistribution#initializerequiresbeta > 0and raises an exception.Assuming there is no bug in the logic here, a good resolution might be to only call
experiment.calc_winning_alternativeswithindashboard/views/_experiment.erbif it will succeed.