Case Study3 min read

Achievements effect on Retention to third month in ecosystem

Automated conversion of retention_on_third.ipynb

Achievements effect on Retention to third month in ecosystem

We call 'Uncofoundedness' a scenario where a treatment is not randomly assigned to participants, so confounders effect on treatment assignment and outcome.

Treatment - purchase in one category.

We will test hypothesis:

HoH_o - There is no difference in retention to third month between treatment and control groups.

HaH_a - There is a difference in LTV between treatment and control groups.

Result
ydtenure_monthsavg_sessions_weekspend_last_monthage_yearsprior_purchases_12msupport_tickets_90dpremium_usermobile_userweekend_useremail_opt_inreferred_usermm_obstau_linkg0g1cate
00.00.028.8146541.078.45942350.3924904.02.00.01.01.01.00.00.1368040.136804-0.0756900.2595860.245305-0.014281
11.01.010.9873673.038.65269831.6526663.00.01.01.01.00.00.00.1575990.1575990.7814290.5923250.7604250.168101
20.01.040.6782129.098.95076048.6340554.05.00.01.00.00.00.00.1654010.1654010.2095180.0438620.0535380.009676
30.01.014.3317645.027.38658842.5026413.03.01.01.01.00.00.00.1588970.1588970.6304570.1483910.2466020.098211
40.01.021.4803042.0119.75396035.3113823.00.00.01.01.01.00.00.1699430.1699430.3463840.5270430.6117480.084704
Result

CausalData(df=(100000, 13), treatment='d', outcome='y', confounders=['tenure_months', 'avg_sessions_week', 'spend_last_month', 'age_years', 'prior_purchases_12m', 'support_tickets_90d', 'premium_user', 'mobile_user', 'weekend_user', 'email_opt_in', 'referred_user'])

Result
treatmentcountmeanstdminp10p25medianp75p90max
00.0850670.4377260.4961100.00.00.00.01.01.01.0
11.0149330.5793880.4936740.00.00.01.01.01.01.0
Result

png

Result
confoundersmean_d_0mean_d_1abs_diffsmdks_pvalue
0spend_last_month83.486832114.09373630.6069050.3361400.00000
1premium_user0.2373780.3713250.1339480.2942340.00000
2avg_sessions_week4.8234106.0050891.1816800.2713470.00000
3prior_purchases_12m3.4206333.8023170.3816840.1908480.00000
4referred_user0.2431970.3100520.0668550.1498700.00000
5age_years36.59462235.0693041.525318-0.1363500.00000
6email_opt_in0.5424900.5936520.0511620.1034210.00000
7mobile_user0.8512700.8826760.0314060.0925750.00000
8support_tickets_90d1.1419821.2435550.1015720.0917420.00000
9tenure_months28.33838729.8486521.5102650.0815310.00000
10weekend_user0.5453700.5757720.0304020.0612820.00000

Inference

Result
value
field
estimandATTE
modelIRM
value0.1026 (ci_abs: 0.0948, 0.1105)
value_relative21.5248 (ci_rel: 19.7531, 23.2965)
alpha0.0500
p_value0.0000
is_significantTrue
n_treated14933
n_control85067
treatment_mean0.5794
control_mean0.4377
time2026-02-20

Refutation

Unconfoundedness

Result
metricvalueflag
0balance_max_smd0.018197GREEN
1balance_frac_violations0.000000GREEN

Sensitivity

Result
r2_yr2_drhotheta_longtheta_shortdelta
d7.802969e-070.0123111.00.1026230.10434-0.001717

SUTVA

Result

1.) Are your clients independent (i). Outcome of ones do not depend on others? 2.) Are all clients have full window to measure metrics? 3.) Do you measure confounders before treatment and outcome after? 4.) Do you have a consistent label of treatment, such as if a person does not receive a treatment, he has a label 0?

Score

Result
metricvalueflag
0se_plugin0.004015NA
1psi_p99_over_med11.693513YELLOW
2psi_kurtosis11.079355YELLOW
3max_|t|_g10.000000GREEN
4max_|t|_g01.562788GREEN
5max_|t|_m1.063697GREEN
6oos_tstat_fold0.000018GREEN
7oos_tstat_strict0.000018GREEN
Result

png

Result

png

Result

png

Overlap

Result

png

Result
metricvalueflag
0edge_0.01_below0.000530GREEN
1edge_0.01_above0.000000GREEN
2edge_0.02_below0.003840GREEN
3edge_0.02_above0.000000GREEN
4KS0.219189GREEN
5AUC0.646729GREEN
6ESS_treated_ratio0.649974GREEN
7ESS_control_ratio0.979919GREEN
8tails_w1_q99/med4.714865YELLOW
9tails_w0_q99/med1.374649YELLOW
10ATT_identity_relerr0.012965GREEN
11clip_m_total0.000530GREEN
12calib_ECE0.011781GREEN
13calib_slope0.784364YELLOW
14calib_intercept-0.345292YELLOW
Result

png

Conclusion

First purchase in our product is retention 0.1026 (ci_abs: 0.0948, 0.1105) p.p. Model is specified correctly and there is no evidence that assumptions are false