How to calculate the sample size in A/B testing that is necessary to achieve a hypothesis test with a certain power? We need to start by finding a threshold value c, such that if the sample mean is larger than c , we’ll reject the null hypothesis u0.
But, that’s not the only condition that c must meet, because c also needs to be defined to ensure that our power is 0.90 or, alternatively, that the probability of a Type II error is 0.10. That would happen if there was a 10% chance that our test statistic fail to reach c.
With alternative hypothesis uA, we have:
Now what we need to do is to equate the equation and solve for sample size n.