

def test_formula_matches_mcmc_result(self):
    a_samples = self.trials.variations['A'].posterior.rvs(size=10000)
    b_samples = self.trials.variations['B'].posterior.rvs(size=10000)
    mcmc_lift = np.mean(((b_samples - a_samples) / a_samples))
    tools.assert_true((np.abs((mcmc_lift - self.statistic['B'])) < eps))

dataset/ETHPy150Open bogdan-kulynych/trials/trials/tests/test_stats.py TestExpectedLift.test_formula_matches_mcmc_result/original