solve for any one parameter of the power of a one sample t-test
Exactly one needs to be None, all others need numeric values.
This test can also be used for a paired t-test, where effect size is defined in terms of the mean difference, and nobs is the number of pairs.
effect_size : float
nobs : int or float
alpha : float in interval (0,1)
power : float in interval (0,1)
alternative : string, ‘two-sided’ (default) or ‘one-sided’
value : float
cache_fit_res : list
The function uses scipy.optimize for finding the value that satisfies the power equation. It first uses brentq with a prior search for bounds. If this fails to find a root, fsolve is used. If fsolve also fails, then, for alpha, power and effect_size, brentq with fixed bounds is used. However, there can still be cases where this fails.