Data Science, Product Analytics, Ab Testing, Simulation, Deep Dives.
tmp_pop_df.sample(sample_size) sample_df['treatment'] = sample_df.index.map( lambda x: 1 if np.random.uniform() > 0.5 else 0) For the treatment group, we increase the probability of retaining by the expected effect size. sample_df['predicted_retention_proba'] =