How to get Effect Size from tt_ind_solve_power?
Question:
I am trying to get the Effect Size given my alpha, power, sample size, ratio. I found tt_ind_solve_power to do this but how would this work for 4 variants + 1 control?
This is how I have it currently
from statsmodels.stats.power import tt_ind_solve_power
effect_size = tt_ind_solve_power(nobs1=X,
alpha=0.05,
power=0.8,
ratio=1,
alternative='two-sided')
My goal is to get the effect size for my experiment with 4 variants. How do I define my nobs=X parameter in the function above? And would the outcome be the effect size per variant or in aggregate?
Sample Sizes:
Variant 1: 990
Variant 2: 1001
Variant 3: 1100
Variant 4: 999
Control: 1002
Any help is very much appreciated!
Answers:
If I understand the question correctly, we need sample size for the treatment, nobs1
, and ratio
for the power effectsize computation.
ratio
is defined by nobs2 = nobs1 * ratio
, so ratio = nobs2 / nobs1
where nobs2
is the number of observations of the control or reference treatment.
For comparing variant1 with the control use:
nobs1 = 990
ratio = 1002 / nobs1
and similar for nobs1 of the other variants or treatments.
I am trying to get the Effect Size given my alpha, power, sample size, ratio. I found tt_ind_solve_power to do this but how would this work for 4 variants + 1 control?
This is how I have it currently
from statsmodels.stats.power import tt_ind_solve_power
effect_size = tt_ind_solve_power(nobs1=X,
alpha=0.05,
power=0.8,
ratio=1,
alternative='two-sided')
My goal is to get the effect size for my experiment with 4 variants. How do I define my nobs=X parameter in the function above? And would the outcome be the effect size per variant or in aggregate?
Sample Sizes:
Variant 1: 990
Variant 2: 1001
Variant 3: 1100
Variant 4: 999
Control: 1002
Any help is very much appreciated!
If I understand the question correctly, we need sample size for the treatment, nobs1
, and ratio
for the power effectsize computation.
ratio
is defined by nobs2 = nobs1 * ratio
, so ratio = nobs2 / nobs1
where nobs2
is the number of observations of the control or reference treatment.
For comparing variant1 with the control use:
nobs1 = 990
ratio = 1002 / nobs1
and similar for nobs1 of the other variants or treatments.