cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
Sample Size and Power for Two Sample Means

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

  1. Select DOE > Sample Size Explorers and choose Power > Power for Two Independent Sample Means.
  1. 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
  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.
  3. Enter Assumed Standard Deviations. Here we assume 2 for each.
  4. 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.
  5. Select parameter to solve for. Here we chose Total Sample Size.
  6. 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.
  7. 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.

gail_massari_0-1754078687119.png

 

gail_massari_1-1754078705829.png

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.

 

Recommended Articles