If your power is 80%, then this means that you have a 20% probability of failing to detect a significant difference when one does exist, i.e., a false negative result (otherwise known as type II error). The power is the probability of detecting a signficant difference when one exists. If your confidence level is 95%, then this means you have a 5% probability of incorrectly detecting a significant difference when one does not exist, i.e., a false positive result (otherwise known as type I error). This reflects the confidence with which you would like to detect a significant difference between the two means. By changing the four inputs (the confidence level, power, difference and population variance) in the Alternative Scenarios, you can see how each input is related to the sample size and what would happen if you didn’t use the recommended sample size.įor some further information, see our blog post on The Importance and Effect of Sample Size. The above sample size calculator provides you with the recommended number of samples required to detect a difference between two means. References can be found in many texts, for example the Estimation of Sample Size and Power for Comparing Two Means section in Rosner, B., (2015).
Note: This is a standard formula based on the normal distribution. for a power of 80%, β is 0.2 and the critical value is 0.84), σ 2 is the population variance, and d is the difference you would like to detect. for a confidence level of 95%, α is 0.05 and the critical value is 1.96), Z β is the critical value of the Normal distribution at β (e.g. Where Z α/2 is the critical value of the Normal distribution at α/2 (e.g. This calculator uses the following formula for the sample size n:
In order to detect a difference of this magnitude that is significant with 95% confidence and a power of 80%, the clinicians will require 33 patients in each group.
#Difference between two mean hypothesis test calculator trial#
When designing a trial to assess the effectiveness of a new therapy treatment on the treatment of severe sepsis and septic shock, how many patients are required in the treatment (new therapy) and control (standard therapy) groups? The clinicians measure the effectiveness of the therapies of the treatments using mean arterial pressures and wish to detect a difference of at least 14mmHg between the two groups (the standard deviation of the two groups is 20mmHg, i.e., the variance is 400mmHg).