statsmodels.stats.power.normal_power_het#

statsmodels.stats.power.normal_power_het(diff, nobs, alpha, std_null=1.0, std_alternative=None, alternative='two-sided')[source]#

Calculate power of a normal distributed test statistic

This is a generalization of normal_power when variance under Null and Alternative differ.

Parameters:
difffloat

difference in the estimated means or statistics under the alternative.

nobsfloat or int

number of observations

alphafloat in interval (0,1)

significance level, e.g., 0.05, is the probability of a type I error, that is wrong rejections if the Null Hypothesis is true.

std_nullfloat, optional

standard deviation under the Null hypothesis without division by sqrt(nobs)

std_alternativefloat, optional

standard deviation under the Alternative hypothesis without division by sqrt(nobs). If None, std_alternative is set to the value of std_null.

alternative{‘two-sided’, ‘larger’, ‘smaller’}, optional

extra argument to choose whether the power is calculated for a two-sided (default) or one sided test. The one-sided test can be either ‘larger’, ‘smaller’.

Returns:
powerfloat

Power of the test, e.g., 0.8, is one minus the probability of a type II error. Power is the probability that the test correctly rejects the Null Hypothesis if the Alternative Hypothesis is true.