Use to interactively explore the relationships between Power, Sample Sizes, and Differences to Detect for testing a hypothesis comparing two population means. See the Two Sample t-test and Confidence Interval guide to learn how to perform a statistical test comparing two sample means.
Sample Size and Power - Two Sample Means
- Select DOE > Sample Size Explorers and choose Power > Power for Two Independent Sample Means.
- Choose the type of test: One-Sided or Two-Sided and choose Alpha (significance level for the test). The null hypothesis is that the two means are equal. Here we chose a two-sided alternative which is used to test that the two means are not equal. This null and alternative hypothesis can be written using notation as H0: m1 = m 2 vs. HA: m 1 ≠ m 2
- Choose if standard deviation is known. If “Yes” analysis will be based on the Z-Test. If “No” analysis will be based on the t-Test.
- Enter Assumed Standard Deviations. Here we assume 2 for each.
- Enter the Difference to Detect. This is the difference between the two population means under HA considered to be true in order to perform the analysis. Here we consider a difference of 2.5, which is 2.5/2.0 = 1.25 standard deviations apart.
- Select parameter to solve for. Here we chose Total Sample Size.
- Enter a value for the Power. Here we entered 0.80. The solution of Total Sample Size of 23 (n1=11 and n2=12) is displayed.
- Use the interactive cross-hair tool (or type in values) for Power, Sample Sizes, Difference to Detect, and Std Devs to study the relationship between these parameters solving for many different scenarios.


Note: Determining sample size to achieve a desired margin of error in a Confidence Interval can be done using DOE > Sample Size Explorers > Confidence Intervals > Margin of Error for Two Independent Sample Means.
The settings and solution for each analysis performed can be saved. The table of saved settings shows the results of three different
analyses performed when testing the hypothesis H0: μ1 = μ 2 vs. HA: μ 1 ≠ μ2
1. What sample size is needed to achieve a power of 80% at detecting a difference of 2.5/2 = 1.25 std dev?
Answer: 23 (n1 = 11 and n2 = 12)
2. What is the power with a sample size of 20 in each group?
Answer: Power = 97.1%
3. What sample size is needed to achieve a power of 80% at detecting a difference of 4/2 = 2 std dev?
Answer: 11 (n1 = 5 and n2 = 6)
Visit Design of Experiments Guide > Sample Size Explorers in JMP Help to learn more.