# Power of a two-sided t-test (equal SDs, alpha 0.05) to detect a difference of 1.2 SD, for different group sizes.
from statsmodels.stats.power import TTestIndPower
P = TTestIndPower()
for n1, n2 in [(10, 10), (12, 8), (14, 6), (16, 4), (10, 20), (10, 30), (15, 15), (10, 6), (6, 6)]:
    print(f"{n1:>2} + {n2:>2} (total {n1 + n2}): power {P.power(effect_size=1.2, nobs1=n1, ratio=n2 / n1, alpha=0.05):.2f}")
