Here's the code we wrote to prepare for the gpa
stats.
agg = (df
.assign(gpa=lambda d: d['gpa'] < d['gpa'].mean())
.groupby('gpa')
.agg(mean_unit_tests=('passed_unit_tests', np.mean),
mean_asserts=('passed_asserts', np.mean),
mean_user_stories=('tackled_user_stories', np.mean))).T
effect_dict = dict(agg[False] - agg[True])
effect_dict
This is where we calculate the numbers exactly.
df_diff.assign(limit=lambda d: d['diff_unit_tests'] < 0.1948)['limit'].mean()
df_diff.assign(limit=lambda d: d['diff_asserts'] < 0.2922)['limit'].mean()
df_diff.assign(limit=lambda d: d['diff_user_stories'] < 0.0584)['limit'].mean()