Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code for the choosing your randomization unit post - https://ianwhitestone.work/choosing-randomization-unit/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ian-whitestone

This comment has been minimized.

Copy link
Owner Author

@ian-whitestone ian-whitestone commented Feb 2, 2021

To anyone reading this who came from the blog post, there's two things in this code that I didn't actually talk about (because they'll be leveraged in a future post and I was too lazy to remove them):

  1. In the run_simulation function I have these arguments:
    conversion_dependent_on_spu=True,
    # x is conversion rate and y is sessions per user (spu)
    conversion_spu_func=lambda x,y: x*2/3 + x*1/3*np.exp(-0.4*y)

This lets me specify a decay function that maps the relationship between sessions per user and conversion rate - i.e. something like this:

  1. All the user level metrics. These will be used in conjunction with ☝️ to explore if you get an increased false positives when doing user level randomization + session level metrics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment