Description Usage Arguments Details Value See Also
Given true data generating distributions and prior distributions for variants A and B, simulate the data, calculate the necessary statistics and declare one of the tests a winner.
1 2 | simulate_ab_test(data_dists, priors, loss_threshold, obs_per_round = 1000,
max_rounds = 100, sim_batch_size = 1e+05)
|
data_dists |
A named list of distribution objects. This list specifies the
distributions that are used to generate data in simulations.
Currently, the list must only have elements named |
priors |
A named list of distribution objects. This list specifies the
distributions that are used as priors when estimating some parameter
from the data generating distribution. Currently, the list must only
have elements named |
loss_threshold |
A positive number that identifies a bound for the expected loss for each variant. Once the expected loss is below this bound, the experiment is concluded. |
obs_per_round |
A positive number that represents how many observations, across both variants,
are generated before we update the prior distributions and
evaluate the expected loss. This number must be divisible by
the number of variants used. Default is |
max_rounds |
A positive integer that specifies the maximum number of
times that we will evaluate the expected loss on both experiments.
Default is |
sim_batch_size |
A positive integer that specifies how much data is simulated when evaluating the expected loss for variants that do not have an analytic solution (i.e. normal data). |
In order to create data_dists
and priors
, you need to use the following
for data generating distributions: bernoulli_dist
,
normal_dist
, poisson_dist
and the following for prior
distributions beta_dist
, normal_gamma_dist
,
beta_dist
,
A list that contains the name of the winning variant, the number of observations used, the loss of the decision, whether the test finished, the metrics from each round, and the raw data.
bernoulli_dist
normal_dist
poisson_dist
beta_dist
normal_gamma_dist
beta_dist
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.