Skip to content

Instantly share code, notes, and snippets.

@lylayang
Created October 3, 2019 19:25
Show Gist options
  • Save lylayang/7eb891146f26f7235f6650b98efca30d to your computer and use it in GitHub Desktop.
Save lylayang/7eb891146f26f7235f6650b98efca30d to your computer and use it in GitHub Desktop.
import bootstrapped.bootstrap as bs
import bootstrapped.compare_functions as bs_compare
import bootstrapped.stats_functions as bs_stats
# run an a/b test simulation ignoring the lengths of the series (average)
# just what is the 'typical' value
# use percent change to compare test and control
print(bs_compare.percent_change(test.mean(), ctrl.mean()))
print(bs.bootstrap_ab(test, ctrl, bs_stats.mean, bs_compare.percent_change))
print(len(test))
print(len(ctrl))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment