FTestPower.power(effect_size, df_num, df_denom, alpha, ncc=1)[source]

Calculate the power of a F-test.

  • effect_size (float) – standardized effect size, mean divided by the standard deviation. effect size has to be positive.
  • df_num (int or float) – numerator degrees of freedom.
  • df_denom (int or float) – denominator degrees of freedom.
  • alpha (float 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.
  • ncc (int) – degrees of freedom correction for non-centrality parameter. see Notes

power – 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.

Return type:



sample size is given implicitly by df_num

set ncc=0 to match t-test, or f-test in LikelihoodModelResults. ncc=1 matches the non-centrality parameter in R::pwr::pwr.f2.test

ftest_power with ncc=0 should also be correct for f_test in regression models, with df_num and d_denom as defined there. (not verified yet)