I'm trying to see if there's an easy way to calculate minimum sample size required for a one-sample Z-test to reject the null hypothesis.
I know that we can reject the null hypothesis (i.e. the A/B test is successful) if
1 - scipy.stats.norm.cdf((x-mu)/(s/np.sqrt(n)) < alpha
where x is the sample mean, mu is the population mean, s is the population standard deviation and n the sample size.
Is there a way in python to solve the equation above for n?
nwhile keepingxfixed?n