Does tt_ind_solve_power output the total sample size of two groups or just one group, assuming a 50-50 split?
# Set parameters
p1 = 0.10
p2 = 0.12
# Calculate effect size
var_p = lambda p: p * (1 - p)
pooled_var = lambda p1, p2: np.sqrt(np.mean(var_p(p1) + var_p(p2)))
cohen_D = (p2 - p1) / pooled_var(p1, p2)
# Solve for power
tt_ind_solve_power(effect_size=cohen_D, power=0.8, alpha=0.05)
This returns the following output which is
7677.14
But, does this value represent the total samples, or just the same for one of the group? The reason I'm confused with this is that, when I want to confirm if 7677 returns ~0.80 power, the nobs1 argument in the function seems to indicate that the size is just for one group:
tt_ind_solve_power(effect_size=cohen_D, nobs1=7677, alpha=0.05)
0.799