Description Usage Arguments Value Details References
Calculate mixture Sequential Probability Ratio Test
1 2 | mSPRT(x, y, xpre = NULL, ypre = NULL, sigma, tau, theta = 0,
distribution = "normal", alpha = 0.05, useCpp = F)
|
x, y |
Numeric vectors |
xpre, ypre |
Numeric vectors of pre-experiment data |
sigma |
Population standard deviation |
tau |
Mixture variance |
theta |
Hypothesised difference between |
distribution |
The desired distribution. |
alpha |
Significance level |
useCpp |
Boolean. Use C++ for calculations? Useful for running many tests as it reduces runtime substantially |
The likelihood ratio
With normal data and normal prior, the closed form solution of the probability ratio after n observations have been collected is:
\tilde{Λ}_n = √{\frac{2σ^2}{V_n + nτ^2}}\exp{≤ft(\frac{n^2τ^2(\bar{Y}_n - \bar{X}_n-θ_0)^2}{4σ2(2σ^2+nτ^2)}\right)}.
With Bernoulli data, the closed form solution is:
\tilde{Λ}_n = √{\frac{V_n}{V_n + nτ^2}}\exp{≤ft(\frac{n^2τ^2(\bar{Y}_n - \bar{X}_n-θ_0)^2}{2V_n(V_n+nτ^2)}\right)}.
Johari, R., Koomen, P., Pekelis, L. & Walsh, D. 2017, 'Peeking at A/B Tests: Why it matters, and what to do about it', ACM, , pp. 1517
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.