DecisionRule
data class DecisionRule(val perArm: Int, val threshold: Int, val alpha: Long, val rate: Long)(source)
The decision rule, fixed before any trial runs. The treatment arm is SUPPORTED when it fails more often than the control with an exact one-sided Fisher p at most DecisionRule.alpha; otherwise it is REFUTED when the chance that a treatment arm failing at the DecisionRule.rate seen on the failing side would fail as seldom as observed is at most DecisionRule.alpha (a binomial lower tail, floored, so it can only be too high and never calls a refutation early); otherwise it is INCONCLUSIVE. SUPPORTED is decided first. DecisionRule.perArm and DecisionRule.threshold are the planned trials and the failures that a clean control needs.