Created
March 8, 2024 09:35
-
-
Save ricardobeat/9791598214c6237cdb45cf961b7ef7dc to your computer and use it in GitHub Desktop.
Sequential test based on Evan Miller's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sequentialTest(control, treatment, sample) { | |
if (treatment - control >= 2.25 * Math.sqrt(sample)) { | |
return 'treatment wins' | |
} else if (control - treatment >= 2.25 * Math.sqrt(sample)) { | |
return 'control wins' | |
} else if (treatment + control >= sample) { | |
return 'stop test. no winner' | |
} | |
return 'continue testing' | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment