Two-Sample T-Tests Assuming Equal Variance

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

PASS Sample Size Software NCSS.

com

Chapter 422

Two-Sample T-Tests
Assuming Equal
Variance
Introduction
This procedure provides sample size and power calculations for one- or two-sided two-sample t-tests when the
variances of the two groups (populations) are assumed to be equal. This is the traditional two-sample t-test
(Fisher, 1925). The assumed difference between means can be specified by entering the means for the two groups
and letting the software calculate the difference or by entering the difference directly.
The design corresponding to this test procedure is sometimes referred to as a parallel-groups design. This design
is used in situations such as the comparison of the income level of two regions, the nitrogen content of two lakes,
or the effectiveness of two drugs.
There are several statistical tests available for the comparison of the center of two populations. This procedure is
specific to the two-sample t-test assuming equal variance. You can examine the sections below to identify
whether the assumptions and test statistic you intend to use in your study match those of this procedure, or if one
of the other PASS procedures may be more suited to your situation.

Other PASS Procedures for Comparing Two Means or Medians


Procedures in PASS are primarily built upon the testing methods, test statistic, and test assumptions that will be
used when the analysis of the data is performed. You should check to identify that the test procedure described
below in the Test Procedure section matches your intended procedure. If your assumptions or testing method are
different, you may wish to use one of the other two-sample procedures available in PASS. These procedures are
Two-Sample T-Tests Allowing Unequal Variance, Two-Sample Z-Tests Assuming Equal Variance, Two-Sample
Z-Tests Allowing Unequal Variance, and the nonparametric Mann-Whitney-Wilcoxon (also known as the Mann-
Whitney U or Wilcoxon rank-sum test) procedure. The methods, statistics, and assumptions for those procedures
are described in the associated chapters.
If you wish to show that the mean of one population is larger (or smaller) than the mean of another population by
a specified amount, you should use one of the clinical superiority procedures for comparing means. Non-
inferiority, equivalence, and confidence interval procedures are also available.

422-1
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Test Assumptions
When running a two-sample equal-variance t-test, the basic assumptions are that the distributions of the two
populations are normal, and that the variances of the two distributions are the same. If those assumptions are not
likely to be met, another testing procedure could be used, and the corresponding procedure in PASS should be
used for sample size or power calculations.

Test Procedure
If we assume that µ1 and µ2 represent the means of the two populations of interest, and that δ = µ1 − µ 2 , the
null hypothesis for comparing the two means is H 0 : µ1 = µ 2 (or H 0 : δ = 0 ). The alternative hypothesis can be
any one of
Two-Sided: H 1 : µ1 ≠ µ 2 (or H 1 : δ ≠ 0 )
Upper One-Sided: H 1 : µ1 > µ 2 (or H 1 : δ > 0 )
Lower One-Sided: H 1 : µ1 < µ 2 (or H 1 : δ < 0 )
depending upon the desire of the researcher or the protocol instructions. A suitable Type I error probability (α) is
chosen for the test, the data is collected, and a t-statistic is generated using the formula:
x1 − x 2
t=
(n1 − 1)s 2
1+ (n2 − 1)s22 1 1
 + 
n1 + n2 − 2  n1 n2 
This t-statistic follows a t distribution with n1 + n2 − 2 degrees of freedom. The null hypothesis is rejected in
favor of the alternative if,
for H 1 : µ1 ≠ µ 2 (or H 1 : δ ≠ 0 ),

t < tα / 2 or t > t1−α / 2 ,

for H 1 : µ1 > µ 2 (or H 1 : δ > 0 ),

t > t1−α ,

or, for H 1 : µ1 < µ 2 (or H 1 : δ < 0 ),

t < tα .
Comparing the t-statistic to the cut-off t-value (as shown here) is equivalent to comparing the p-value to α.

422-2
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Power Calculation
This section describes the procedure for computing the power from n1 and n2 , α, the assumed µ1 and µ2 , and
the assumed common standard deviation, σ1 = σ 2 = σ . Two good references for these methods are Julious
(2010) and Chow, Shao, Wang, and Lokhnygina (2018).
The figure below gives a visual representation for the calculation of power for a one-sided test.

Central t Non-central t
distribution distribution
Power
α

0 t1-α λ

If we call the assumed difference between the means, δ = µ1 − µ 2 , the steps for calculating the power are as
follows:
1. Find t1−α based on the central-t distribution with degrees of freedom,

df = n1 + n2 − 2 .
2. Calculate the non-centrality parameter:
δ
λ= .
1 1
σ +
n1 n2
3. Calculate the power as the probability that the test statistic t is greater than t1−α under the non-central-t
distribution with non-centrality parameter λ :
Power = PrNon −central −t (t > t1−α | df = n1 + n2 − 2, λ ).
The algorithms for calculating power for the opposite direction and the two-sided hypotheses are analogous to this
method.
When solving for something other than power, PASS uses this same power calculation formulation, but performs
a search to determine that parameter.

A Note on Specifying the Means or Difference in Means


When means are specified in this procedure, they are used to determine the assumed difference in means for
power or sample size calculations. When the difference in means is specified in this procedure, it is the assumed
difference in means for power or sample size calculations. It does not mean that the study will be powered to
show that the mean difference is this amount, but rather that the design is powered to reject the null hypothesis of
equal means if this were the true difference in means. If your purpose is to show that one mean is greater than
another by a specific amount, you should use one of the clinical superiority procedures for comparing means.

422-3
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

A Note on Specifying the Standard Deviation


The sample size calculation for most statistical procedures is based on the choice of alpha, power, and an assumed
difference in the primary parameters of interest – the difference in means in this procedure. An additional
parameter that must be specified for means tests is the standard deviation. Here, we will briefly discuss some
considerations for the choice of the standard deviation to enter.
If a number of previous studies of a similar nature are available, you can estimate the variance based on a
weighted average of the variances, and then take the square root to give the projected standard deviation.
Perhaps more commonly, only a single pilot study is available, or it may be that no previous study is available.
For both of these cases, the conservative approach is typically recommended. In PASS, there is a standard
deviation estimator tool. This tool can be used to help select an appropriate value or range of values for the
standard deviation.
If the standard deviation is not given directly from the previous study, it may be obtained from the standard error,
percentiles, or the coefficient of variation. Once a standard deviation estimate is obtained, it may useful to then
use the confidence limits tab to obtain a confidence interval for the standard deviation estimate. With regard to
power and sample size, the upper confidence limit will then be a conservative estimate of the standard deviation.
Or a range of values from the lower confidence limit to the upper confidence limit may be used to determine the
effect of the standard deviation on the power or sample size requirement.
If there is no previous study available, a couple of rough estimation options can be considered. You may use the
data tab of the standard deviation estimator to enter some values that represent typical values you expect to
encounter. This tool will allow you to see the corresponding population or sample standard deviation. A second
rough estimation technique is to base the estimate of the standard deviation on your estimate of the range of the
population or the range of a data sample. A conservative divisor for the population range is 4. For example, if you
are confident your population values range from 45 to 105, you would enter 60 for the Population Range, and,
say, 4, for ‘C’. The resulting standard deviation estimate would be 15.
If you are unsure about the value you should enter for the standard deviation, we recommend that you additionally
examine a range of standard deviation values to see the effect that your choice has on power or sample size.

Procedure Options
This section describes the options that are specific to this procedure. These are located on the Design tab. For
more information about the options of other tabs, go to the Procedure Window chapter.

Design Tab
The Design tab contains most of the parameters and options that you will be concerned with.

Solve For
Solve For
This option specifies the parameter to be solved for from the other parameters. The parameters that may be
selected are Power, Sample Size, Effect Size (Means or Difference), and Alpha. In most situations, you will likely
select either Power or Sample Size.
The ‘Solve For’ parameter is the parameter that will be displayed on the vertical axis of any plots that are shown.

422-4
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Test Direction
Alternative Hypothesis
Specify whether the alternative hypothesis of the test is one-sided or two-sided. If a one-sided test is chosen, the
hypothesis test direction is chosen based on whether the difference (δ = μ1 - μ2) is greater than or less than zero.

Two-Sided Hypothesis Test


H0: δ = 0 vs. H1: δ ≠ 0

One-Sided Hypothesis Tests


Upper: H0: δ ≤ 0 vs. H1: δ > 0
Lower: H0: δ ≥ 0 vs. H1: δ < 0

Power and Alpha


Power
Power is the probability of rejecting the null hypothesis when it is false. Power is equal to 1 - Beta, so specifying
power implicitly specifies beta. Beta is the probability obtaining a false negative with the statistical test. That is, it
is the probability of accepting a false null hypothesis.
The valid range is 0 to 1. Different disciplines have different standards for setting power. The most common
choice is 0.90, but 0.80 is also popular.
You can enter a single value, such as 0.90, or a series of values, such as .70 .80 .90, or .70 to .90 by .1.
When a series of values is entered, PASS will generate a separate calculation result for each value of the series.
Alpha
Alpha is the probability of obtaining a false positive with the statistical test. That is, it is the probability of
rejecting a true null hypothesis. The null hypothesis is usually that the parameters of interest (means, proportions,
etc.) are equal.
Since Alpha is a probability, it is bounded by 0 and 1. Commonly, it is between 0.001 and 0.10.
Alpha is often set to 0.05 for two-sided tests and to 0.025 for one-sided tests.
You can enter a single value, such as 0.05, or a series of values, such as .05 .10 .15, or .05 to .15 by .01.
When a series of values is entered, PASS will generate a separate calculation result for each value of the series.

Sample Size (When Solving for Sample Size)


Group Allocation
Select the option that describes the constraints on N1 or N2 or both.
The options are

• Equal (N1 = N2)


This selection is used when you wish to have equal sample sizes in each group. Since you are solving for both
sample sizes at once, no additional sample size parameters need to be entered.

• Enter N1, solve for N2


Select this option when you wish to fix N1 at some value (or values), and then solve only for N2. Please note
that for some values of N1, there may not be a value of N2 that is large enough to obtain the desired power.

422-5
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

• Enter N2, solve for N1


Select this option when you wish to fix N2 at some value (or values), and then solve only for N1. Please note
that for some values of N2, there may not be a value of N1 that is large enough to obtain the desired power.

• Enter R = N2/N1, solve for N1 and N2


For this choice, you set a value for the ratio of N2 to N1, and then PASS determines the needed N1 and N2,
with this ratio, to obtain the desired power. An equivalent representation of the ratio, R, is
N2 = R * N1.

• Enter percentage in Group 1, solve for N1 and N2


For this choice, you set a value for the percentage of the total sample size that is in Group 1, and then PASS
determines the needed N1 and N2 with this percentage to obtain the desired power.
N1 (Sample Size, Group 1)
This option is displayed if Group Allocation = “Enter N1, solve for N2”
N1 is the number of items or individuals sampled from the Group 1 population.
N1 must be ≥ 2. You can enter a single value or a series of values.
N2 (Sample Size, Group 2)
This option is displayed if Group Allocation = “Enter N2, solve for N1”
N2 is the number of items or individuals sampled from the Group 2 population.
N2 must be ≥ 2. You can enter a single value or a series of values.
R (Group Sample Size Ratio)
This option is displayed only if Group Allocation = “Enter R = N2/N1, solve for N1 and N2.”
R is the ratio of N2 to N1. That is,
R = N2 / N1.
Use this value to fix the ratio of N2 to N1 while solving for N1 and N2. Only sample size combinations with this
ratio are considered.
N2 is related to N1 by the formula:
N2 = [R × N1],
where the value [Y] is the next integer ≥ Y.
For example, setting R = 2.0 results in a Group 2 sample size that is double the sample size in Group 1 (e.g., N1 =
10 and N2 = 20, or N1 = 50 and N2 = 100).
R must be greater than 0. If R < 1, then N2 will be less than N1; if R > 1, then N2 will be greater than N1. You can
enter a single or a series of values.
Percent in Group 1
This option is displayed only if Group Allocation = “Enter percentage in Group 1, solve for N1 and N2.”
Use this value to fix the percentage of the total sample size allocated to Group 1 while solving for N1 and N2.
Only sample size combinations with this Group 1 percentage are considered. Small variations from the specified
percentage may occur due to the discrete nature of sample sizes.
The Percent in Group 1 must be greater than 0 and less than 100. You can enter a single or a series of values.

422-6
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Sample Size (When Not Solving for Sample Size)


Group Allocation
Select the option that describes how individuals in the study will be allocated to Group 1 and to Group 2.
The options are

• Equal (N1 = N2)


This selection is used when you wish to have equal sample sizes in each group. A single per group sample
size will be entered.

• Enter N1 and N2 individually


This choice permits you to enter different values for N1 and N2.

• Enter N1 and R, where N2 = R * N1


Choose this option to specify a value (or values) for N1, and obtain N2 as a ratio (multiple) of N1.

• Enter total sample size and percentage in Group 1


Choose this option to specify a value (or values) for the total sample size (N), obtain N1 as a percentage of N,
and then N2 as N - N1.
Sample Size Per Group
This option is displayed only if Group Allocation = “Equal (N1 = N2).”
The Sample Size Per Group is the number of items or individuals sampled from each of the Group 1 and Group 2
populations. Since the sample sizes are the same in each group, this value is the value for N1, and also the value
for N2.
The Sample Size Per Group must be ≥ 2. You can enter a single value or a series of values.
N1 (Sample Size, Group 1)
This option is displayed if Group Allocation = “Enter N1 and N2 individually” or “Enter N1 and R, where N2 =
R * N1.”
N1 is the number of items or individuals sampled from the Group 1 population.
N1 must be ≥ 2. You can enter a single value or a series of values.
N2 (Sample Size, Group 2)
This option is displayed only if Group Allocation = “Enter N1 and N2 individually.”
N2 is the number of items or individuals sampled from the Group 2 population.
N2 must be ≥ 2. You can enter a single value or a series of values.

422-7
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

R (Group Sample Size Ratio)


This option is displayed only if Group Allocation = “Enter N1 and R, where N2 = R * N1.”
R is the ratio of N2 to N1. That is,
R = N2/N1
Use this value to obtain N2 as a multiple (or proportion) of N1.
N2 is calculated from N1 using the formula:
N2=[R x N1],
where the value [Y] is the next integer ≥ Y.
For example, setting R = 2.0 results in a Group 2 sample size that is double the sample size in Group 1.
R must be greater than 0. If R < 1, then N2 will be less than N1; if R > 1, then N2 will be greater than N1. You can
enter a single value or a series of values.
Total Sample Size (N)
This option is displayed only if Group Allocation = “Enter total sample size and percentage in Group 1.”
This is the total sample size, or the sum of the two group sample sizes. This value, along with the percentage of
the total sample size in Group 1, implicitly defines N1 and N2.
The total sample size must be greater than one, but practically, must be greater than 3, since each group sample
size needs to be at least 2.
You can enter a single value or a series of values.
Percent in Group 1
This option is displayed only if Group Allocation = “Enter total sample size and percentage in Group 1.”
This value fixes the percentage of the total sample size allocated to Group 1. Small variations from the specified
percentage may occur due to the discrete nature of sample sizes.
The Percent in Group 1 must be greater than 0 and less than 100. You can enter a single value or a series of
values.

Effect Size
Input Type
Indicate what type of values to enter to specify the effect size. Regardless of the entry type chosen, the test
statistics used in the power and sample size calculations are the same. This option is simply given for convenience
in specifying the effect size.
The difference is calculated using the formula

δ = μ1 - μ2

The choices are

• Means
Enter μ1 (Group 1 Mean) and μ2 (Group 2 Mean).

• Difference in Means
Enter the difference, δ, directly.
Both choices also require you to enter the standard deviation, σ.

422-8
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Effect Size – Means


µ1 (Mean of Group 1)
Enter a value for the assumed mean of Group 1. The calculations of this procedure are based on difference
between the two means, μ1 - μ2. This difference is the difference at which the design is powered to reject equal
means.
μ1 can be any value (positive, negative, or zero).
You can enter a single value, such as 10, or a series of values, such as 10 20 30, or 5 to 50 by 5.
When a series of values is entered, PASS will generate a separate calculation result for each value of the series.

µ2 (Mean of Group 2)
Enter a value for the assumed mean of Group 2. The calculations of this procedure are based on difference
between the two means, μ1 - μ2. This difference is the difference at which the design is powered to reject equal
means.
μ2 can be any value (positive, negative, or zero).
You can enter a single value, such as 10, or a series of values, such as 10 20 30, or 5 to 50 by 5.
When a series of values is entered, PASS will generate a separate calculation result for each value of the series.

Effect Size – Difference in Means


δ
Enter a value for the assumed difference between the means of Groups 1 and 2. This difference is the difference at
which the design is powered to reject equal means.
δ = μ1 - μ2
δ can be any non-zero value (positive or negative).
You can enter a single value, such as 10, or a series of values, such as 10 20 30, or 5 to 50 by 5.
When a series of values is entered, PASS will generate a separate calculation result for each value of the series.

Standard Deviation
σ (Standard Deviation)
The standard deviation entered here is the assumed standard deviation for both the Group 1 population and the
Group 2 population.
σ must be a positive number.
You can enter a single value, such as 5, or a series of values, such as 1 3 5 7 9, or 1 to 10 by 1.
When a series of values is entered, PASS will generate a separate calculation result for each value of the series.
Press the small 'σ' button to the right to obtain calculation options for estimating the standard deviation.

422-9
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Example 1 – Finding the Sample Size


Researchers wish to compare two types of local anesthesia to determine whether there is a difference in time to
loss of pain. Subjects will be randomized to treatment, the treatment will be administered, and the time to loss of
pain measured. The anticipated time to loss of pain for one of the types of anesthesia is 9 minutes. The researchers
would like to generate a sample size for the study with 90% power to reject the null hypothesis of equal loss-of-
pain time if the true difference is at least 2 minutes. How many participants are needed to achieve 90% power at
significance levels of 0.01 and 0.05?
Past experiments of this type have had standard deviations in the range of 1 to 5 minutes. It is anticipated that the
standard deviation of the two groups will be equal. It is unknown which treatment has lower time to loss of pain,
so a two-sided test will be used.

Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the Two-Sample T-Tests Assuming Equal Variance procedure window by expanding Means,
then Two Independent Means, then clicking on Test (Inequality), and then clicking on Two-Sample T-Tests
Assuming Equal Variance. You may then make the appropriate entries as listed below, or open Example 1a by
going to the File menu and choosing Open Example Template.

Option Value
Design Tab
Solve For ................................................ Sample Size
Alternative Hypothesis ............................ Two-Sided
Power ...................................................... 0.90
Alpha ....................................................... 0.01 0.05
Group Allocation ..................................... Equal (N1 = N2)
Input Type ............................................... Means
μ1 ............................................................ 11
μ2 ............................................................ 9
σ .............................................................. 1 to 5 by 1

Annotated Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≠ 0 vs. H1: δ ≠ 0

Target Actual
Power Power N1 N2 N μ1 μ2 δ σ Alpha
0.90 0.92949 10 10 20 11.0 9.0 2.0 1.0 0.010
0.90 0.92907 7 7 14 11.0 9.0 2.0 1.0 0.050
0.90 0.90596 32 32 64 11.0 9.0 2.0 2.0 0.010
0.90 0.91250 23 23 46 11.0 9.0 2.0 2.0 0.050
0.90 0.90182 69 69 138 11.0 9.0 2.0 3.0 0.010
0.90 0.90434 49 49 98 11.0 9.0 2.0 3.0 0.050
0.90 0.90083 121 121 242 11.0 9.0 2.0 4.0 0.010
0.90 0.90323 86 86 172 11.0 9.0 2.0 4.0 0.050
0.90 0.90062 188 188 376 11.0 9.0 2.0 5.0 0.010
0.90 0.90148 133 133 266 11.0 9.0 2.0 5.0 0.050

422-10
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

References
Chow, S.C., Shao, J., Wang, H., and Lokhnygina, Y. 2018. Sample Size Calculations in Clinical Research, Third
Edition. Taylor & Francis/CRC. Boca Raton, Florida.
Julious, S. A. 2010. Sample Sizes for Clinical Trials. Chapman & Hall/CRC. Boca Raton, FL.
Machin, D., Campbell, M., Fayers, P., and Pinol, A. 1997. Sample Size Tables for Clinical Studies, 2nd
Edition. Blackwell Science. Malden, MA.
Zar, Jerrold H. 1984. Biostatistical Analysis (Second Edition). Prentice-Hall. Englewood Cliffs, New Jersey.

Report Definitions
Target Power is the desired power value (or values) entered in the procedure. Power is the probability of
rejecting a false null hypothesis.
Actual Power is the power obtained in this scenario. Because N1 and N2 are discrete, this value is often
(slightly) larger than the target power.
N1 and N2 are the number of items sampled from each population.
N is the total sample size, N1 + N2.
N = N1 + N2 is the total sample size.
δ = μ1 - μ2 is the difference between population means at which power and sample size calculations are made.
σ is the assumed population standard deviation for each of the two groups.
Alpha is the probability of rejecting a true null hypothesis.

Summary Statements ─────────────────────────────────────────────────────────


Group sample sizes of 10 and 10 achieve 92.949% power to reject the null hypothesis of equal
means when the population mean difference is μ1 - μ2 = 11.0 - 9.0 = 2.0 with a standard
deviation for both groups of 1.0 and with a significance level (alpha) of 0.010 using a
two-sided two-sample equal-variance t-test.

These reports show the values of each of the parameters, one scenario per row.

Plots Section

422-11
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

These plots show the relationship between the standard deviation and sample size for the two alpha levels.
To specify the difference directly to get the same results, change Input Type to Difference and enter 2 for δ,
leaving everything else the same. You may then make the appropriate entries as listed below, or open Example
1b by going to the File menu and choosing Open Example Template.
Option Value
Design Tab
Input Type ............................................... Difference
δ .............................................................. 2

Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≠ 0 vs. H1: δ ≠ 0

Target Actual
Power Power N1 N2 N δ σ Alpha
0.90 0.92949 10 10 20 2.0 1.0 0.010
0.90 0.92907 7 7 14 2.0 1.0 0.050
0.90 0.90596 32 32 64 2.0 2.0 0.010
. . . . . . . .
. . . . . . . .
. . . . . . . .

The results are the same as those obtained when the means are entered.
422-12
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Example 2 – Finding the Power


Suppose a new corn fertilizer is to be compared to a current fertilizer. The current fertilizer produces an average
of about 74 lbs. per plot. The researchers need only show that there is difference in yield with the new fertilizer.
They would like to consider the effect of the number of plots used on the power of the test if the improvement in
yield is at least 10 lbs.
Researchers plan to use a one-sided two-sample t-test with alpha equal to 0.05. Previous studies indicate the
standard deviation for plot yield to be between 20 and 30 lbs. The plot group sizes of interest are 10 to 100 plots
per group.

Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the Two-Sample T-Tests Assuming Equal Variance procedure window by expanding Means,
then Two Independent Means, then clicking on Test (Inequality), and then clicking on Two-Sample T-Tests
Assuming Equal Variance. You may then make the appropriate entries as listed below, or open Example 2 by
going to the File menu and choosing Open Example Template.

Option Value
Design Tab
Solve For ................................................ Power
Alternative Hypothesis ............................ One-Sided
Alpha ....................................................... 0.05
Group Allocation ..................................... Equal (N1 = N2)
Sample Size Per Group .......................... 10 to 100 by 10
Input Type ............................................... Means
μ1 ............................................................ 84
μ2 ............................................................ 74
σ .............................................................. 20 25 30

Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≤ 0 vs. H1: δ > 0

Power N1 N2 N μ1 μ2 δ σ Alpha
0.28476 10 10 20 84.0 74.0 10.0 20.0 0.050
0.46337 20 20 40 84.0 74.0 10.0 20.0 0.050
0.60603 30 30 60 84.0 74.0 10.0 20.0 0.050
0.71625 40 40 80 84.0 74.0 10.0 20.0 0.050
0.79894 50 50 100 84.0 74.0 10.0 20.0 0.050
0.85948 60 60 120 84.0 74.0 10.0 20.0 0.050
0.90297 70 70 140 84.0 74.0 10.0 20.0 0.050
0.93369 80 80 160 84.0 74.0 10.0 20.0 0.050
0.95510 90 90 180 84.0 74.0 10.0 20.0 0.050
0.96985 100 100 200 84.0 74.0 10.0 20.0 0.050
0.21656 10 10 20 84.0 74.0 10.0 25.0 0.050
0.34367 20 20 40 84.0 74.0 10.0 25.0 0.050
0.45471 30 30 60 84.0 74.0 10.0 25.0 0.050

422-13
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

0.55111 40 40 80 84.0 74.0 10.0 25.0 0.050


0.63357 50 50 100 84.0 74.0 10.0 25.0 0.050
0.70314 60 60 120 84.0 74.0 10.0 25.0 0.050
0.76113 70 70 140 84.0 74.0 10.0 25.0 0.050
0.80897 80 80 160 84.0 74.0 10.0 25.0 0.050
0.84807 90 90 180 84.0 74.0 10.0 25.0 0.050
0.87978 100 100 200 84.0 74.0 10.0 25.0 0.050
0.17689 10 10 20 84.0 74.0 10.0 30.0 0.050
0.27109 20 20 40 84.0 74.0 10.0 30.0 0.050
0.35609 30 30 60 84.0 74.0 10.0 30.0 0.050
0.43365 40 40 80 84.0 74.0 10.0 30.0 0.050
0.50411 50 50 100 84.0 74.0 10.0 30.0 0.050
0.56765 60 60 120 84.0 74.0 10.0 30.0 0.050
0.62456 70 70 140 84.0 74.0 10.0 30.0 0.050
0.67519 80 80 160 84.0 74.0 10.0 30.0 0.050
0.71995 90 90 180 84.0 74.0 10.0 30.0 0.050
0.75932 100 100 200 84.0 74.0 10.0 30.0 0.050

These reports show the values of each of the parameters, one scenario per row.

Plots Section

These plots show the relationship between the power and sample size for the three values of σ.
Again, to specify the difference directly to get the same results, change Input Type to Difference and enter 10 for
δ, leaving everything else the same. You’ll get the same results as those above.
Option Value
Design Tab
Input Type ............................................... Difference
δ .............................................................. 10

422-14
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Example 3 – Finding the Difference


In some cases it may be useful to determine how different the means of two populations would need to be to
achieve the desired power with a specific constrained sample size.
Suppose, for example, that 80 subjects are available for a study to compare weight loss regimens. Researchers
would like to determine which of the two regimens is better. The anticipated weight loss after two months is
anticipated to be about 20 lbs. The researchers would like to know how different the mean weight loss must be to
have a study with 90% power when alpha is 0.05 and the standard deviation is assumed to be 7 lbs. in both
groups.

Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the Two-Sample T-Tests Assuming Equal Variance procedure window by expanding Means,
then Two Independent Means, then clicking on Test (Inequality), and then clicking on Two-Sample T-Tests
Assuming Equal Variance. You may then make the appropriate entries as listed below, or open Example 3 by
going to the File menu and choosing Open Example Template.

Option Value
Design Tab
Solve For ................................................ Effect Size (Means or Difference)
Alternative Hypothesis ............................ Two-Sided
Power ...................................................... 0.90
Alpha ....................................................... 0.05
Group Allocation ..................................... Equal (N1 = N2)
Sample Size Per Group .......................... 40
Input Type ............................................... Difference
δ .............................................................. Search > 0
σ .............................................................. 7
Reports Tab
Means, Difference Decimals ................... 3

Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≠ 0 vs. H1: δ ≠ 0

Power N1 N2 N δ σ Alpha
0.90000 40 40 80 5.137 7.0 0.050

If the true population mean weight loss for one group is 5.137 lbs. more or less than the other, the researchers
would have 90% power to show a difference between the groups.

422-15
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Example 4 – Validation of Sample Size using Machin et al. (1997)


Machin et al. (1997) page 35 present an example for a two-sided test in which the mean difference is 5, the
common standard deviation is 10, the power is 90%, and the significance level is 0.05. They calculate the per
group sample size as 86.

Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the Two-Sample T-Tests Assuming Equal Variance procedure window by expanding Means,
then Two Independent Means, then clicking on Test (Inequality), and then clicking on Two-Sample T-Tests
Assuming Equal Variance. You may then make the appropriate entries as listed below, or open Example 4 by
going to the File menu and choosing Open Example Template.

Option Value
Design Tab
Solve For ................................................ Sample Size
Alternative Hypothesis ............................ Two-Sided
Power ...................................................... 0.90
Alpha ....................................................... 0.05
Group Allocation ..................................... Equal (N1 = N2)
Input Type ............................................... Difference
δ .............................................................. 5
σ .............................................................. 10

Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≠ 0 vs. H1: δ ≠ 0

Target Actual
Power Power N1 N2 N δ σ Alpha
0.90 0.90323 86 86 172 5.0 10.0 0.050

The sample size of 86 per group matches Machin’s result exactly.

422-16
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Example 5 – Validation of Power using Zar (1984)


Zar (1984) page 136 give an example in which the mean difference is 1, the common standard deviation is
0.7206, the sample sizes are 15 in each group, and the significance level is 0.05. They calculate the power as 0.96.

Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the Two-Sample T-Tests Assuming Equal Variance procedure window by expanding Means,
then Two Independent Means, then clicking on Test (Inequality), and then clicking on Two-Sample T-Tests
Assuming Equal Variance. You may then make the appropriate entries as listed below, or open Example 5 by
going to the File menu and choosing Open Example Template.

Option Value
Design Tab
Solve For ................................................ Power
Alternative Hypothesis ............................ Two-Sided
Alpha ....................................................... 0.05
Group Allocation ..................................... Equal (N1 = N2)
Sample Size Per Group .......................... 15
Input Type ............................................... Means
μ1 ............................................................ 1
μ2 ............................................................ 0
σ .............................................................. 0.7206
Reports Tab
Standard Deviation Decimals ................. 4

Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≠ 0 vs. H1: δ ≠ 0

Power N1 N2 N μ1 μ2 δ σ Alpha
0.95611 15 15 30 1.0 0.0 1.0 0.7206 0.050

The power of 0.95611 matches Zar’s result of 0.96 to the two decimal places given.

422-17
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Example 6 – Validation using Julious (2010)


Julious (2010) page 49, as part of a table, gives an example in which the mean difference is 0.05, the common
standard deviation is 1, the power is 90%, and the significance level is 0.05. He calculates the sample size for each
group to be 8,407.

Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the Two-Sample T-Tests Assuming Equal Variance procedure window by expanding Means,
then Two Independent Means, then clicking on Test (Inequality), and then clicking on Two-Sample T-Tests
Assuming Equal Variance. You may then make the appropriate entries as listed below, or open Example 6 by
going to the File menu and choosing Open Example Template.

Option Value
Design Tab
Solve For ................................................ Sample Size
Alternative Hypothesis ............................ Two-Sided
Power ...................................................... 0.90
Alpha ....................................................... 0.05
Group Allocation ..................................... Equal (N1 = N2)
Input Type ............................................... Difference
δ .............................................................. 0.05
σ .............................................................. 1
Reports Tab
Means, Difference Decimals ................... 2

Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≠ 0 vs. H1: δ ≠ 0

Target Actual
Power Power N1 N2 N δ σ Alpha
0.90 0.90003 8407 8407 16814 0.05 1.0 0.050

The sample size matches Julious’ result of 8,407 exactly.

422-18
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
Two-Sample T-Tests Assuming Equal Variance

Example 7 – Validation using Chow, Shao, Wang, and Lokhnygina


(2018)
Chow, Shao, Wang, and Lokhnygina (2018) presents an example on page 53 of a two-sided two-sample t-test
sample size calculation for equal group sizes in which δ = 0.05, σ = 0.1, alpha = 0.05, and power = 0.80. They
obtain a sample size of 64 for each group.

Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the Two-Sample T-Tests Assuming Equal Variance procedure window by expanding Means,
then Two Independent Means, then clicking on Test (Inequality), and then clicking on Two-Sample T-Tests
Assuming Equal Variance. You may then make the appropriate entries as listed below, or open Example 7 by
going to the File menu and choosing Open Example Template.

Option Value
Design Tab
Solve For ................................................ Sample Size
Alternative Hypothesis ............................ Two-Sided
Power ...................................................... 0.80
Alpha ....................................................... 0.05
Group Allocation ..................................... Equal (N1 = N2)
Input Type ............................................... Difference
δ .............................................................. 0.05
σ .............................................................. 0.1

Output
Click the Calculate button to perform the calculations and generate the following output.

Numeric Results
Numeric Results for an Equal-Variance T-Test ─────────────────────────────────────────
δ = μ1 - μ2
Hypotheses: H0: δ ≠ 0 vs. H1: δ ≠ 0

Target Actual
Power Power N1 N2 N δ σ Alpha
0.80 0.80146 64 64 128 0.1 0.1 0.050

The sample size of 64 in each group matches the expected result.

422-19
© NCSS, LLC. All Rights Reserved.

You might also like