A/B test sample size calculator which uses a two-tailed sequential likelihood ratio test with false discovery rate controls to calculate statistical significance.
This package is inspired by the great work done by Optimizely's Stats Engine.
For the original online version click here
sample-size-calculator is available as an npm package.
#with yarn
yarn add @arpeely/sample-size-calculator
#with npm
npm install @arpeely/sample-size-calculator
import sampleSizeEstimate from '@arpeely/sample-size-calculator'
// The minimum relative change in conversion rate you would like to be able to detect.
const relativeMDE = 0.3 // 30%
// Your control group's expected conversion rate
const baselineConversionRate = 0.3572 // 35.72%
// Sample size per variation
const sampleSize = sampleSizeEstimate(relativeMDE, baselineConversionRate)
console.log(sampleSize) // output: 160