One-Sample Z-Tests: Other PASS Procedures For Testing One Mean or Median
One-Sample Z-Tests: Other PASS Procedures For Testing One Mean or Median
com
Chapter 414
One-Sample Z-Tests
Introduction
The one-sample z-test is used to test whether the mean of a population is greater than, less than, or not equal to a
specific value. Because the standard normal distribution is used to calculate critical values for the test, this test is
often called the one-sample z-test. The z-test assumes that the population standard deviation is known.
414-1
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
It will be convenient to adopt the following specialize notation for the discussion of these tests.
414-2
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Limitations
There are few limitations when using these tests. Sample sizes may range from a few to several hundred. If your
data are discrete with at least five unique values, you can often ignore the continuous variable assumption.
Perhaps the greatest restriction is that your data come from a random sample of the population. If you do not have
a random sample, your significance levels will probably be incorrect.
414-3
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
4. Power = 1 − Φ(𝑧𝑧1 ).
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 calculated from the values of the other parameters. Under most
conditions, you would select either Power or Sample Size.
Select Sample Size when you want to determine the sample size needed to achieve a given power and alpha error
level.
Select Power when you want to calculate the power of an experiment that has already been run.
Test
Alternative Hypothesis
Specify the alternative hypothesis of the test. Since the null hypothesis is the opposite of the alternative,
specifying the alternative is all that is needed. Usually, the two-tailed (≠) option is selected.
The options containing only < or > are one-tailed tests. When you choose one of these options, you must be sure
that the input parameters match this selection.
Possible selections are:
414-4
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Sample Size
N (Sample Size)
This option specifies one or more values of the sample size, the number of individuals in the study. This value
must be an integer greater than one. Note that you may enter a list of values using the syntax 50,100,150,200,250
or 50 to 250 by 50.
414-5
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
414-6
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the One-Sample Z-Tests procedure window by expanding Means, then One Mean, then clicking
on Z-Test (Inequality), and then clicking on One-Sample Z-Tests. You may then make the appropriate entries
as listed below, or open Example 1 by going to the File menu and choosing Open Example Template.
Option Value
Design Tab
Solve For ................................................ Power
Alternative Hypothesis ............................ Two-Sided (H1: μ ≠ μ0)
Population Size ....................................... Infinite
Alpha ....................................................... 0.01 0.05 0.10
N (Sample Size)...................................... 20 to 120 by 20
μ0 (Null or Baseline Mean) ..................... 100
μ1 (Actual mean) .................................... 110
σ (Standard Deviation) ........................... 40
414-7
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Annotated Output
Click the Calculate button to perform the calculations and generate the following output.
Diff Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha Beta
0.07256 20 100.0 110.0 10.0 40.0 0.250 0.010 0.92744
0.15996 40 100.0 110.0 10.0 40.0 0.250 0.010 0.84004
0.26130 60 100.0 110.0 10.0 40.0 0.250 0.010 0.73870
0.36702 80 100.0 110.0 10.0 40.0 0.250 0.010 0.63298
0.46978 100 100.0 110.0 10.0 40.0 0.250 0.010 0.53022
0.56466 120 100.0 110.0 10.0 40.0 0.250 0.010 0.43534
(report continues)
Report Definitions
Power is the probability of rejecting a false null hypothesis. It should be close to one.
N is the size of the sample drawn from the population. To conserve resources, it should be small.
μ0 is the value of the population mean under the null hypothesis.
μ1 is the actual value of the population mean at which power and sample size are calculated.
μ1 - μ0 is the difference between the actual and null means.
σ is the standard deviation of the population. It measures the variability in the population.
Effect Size = |μ1 - μ0|/σ is the relative magnitude of the effect.
Alpha is the probability of rejecting a true null hypothesis. It should be small.
Beta is the probability of accepting a false null hypothesis. It should be small.
This report shows the values of each of the parameters, one scenario per row. The values of power and beta were
calculated from the other parameters.
The definitions of each column are given in the Report Definitions section.
Plots Section
These plots show the relationship between sample size and power for various values of alpha.
414-8
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the One-Sample Z-Tests procedure window by expanding Means, then One Mean, then clicking
on Z-Test (Inequality), and then clicking on One-Sample Z-Tests. 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 ................................................ Sample Size
Alternative Hypothesis ............................ Two-Sided (H1: μ ≠ μ0)
Population Size ....................................... Infinite
Power ...................................................... 0.80 0.90
Alpha ....................................................... 0.05
μ0 (Null or Baseline Mean) ..................... 3300
μ1 (Actual mean) .................................... 2475 2970 3135
σ (Standard Deviation) ........................... 663
Output
Click the Calculate button to perform the calculations and generate the following output.
Diff Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha Beta
0.86171 6 3300.0 2475.0 -825.0 663.0 1.244 0.050 0.13829
0.90861 7 3300.0 2475.0 -825.0 663.0 1.244 0.050 0.09139
0.80391 32 3300.0 2970.0 -330.0 663.0 0.498 0.050 0.19609
0.90387 43 3300.0 2970.0 -330.0 663.0 0.498 0.050 0.09613
0.80085 127 3300.0 3135.0 -165.0 663.0 0.249 0.050 0.19915
0.90058 170 3300.0 3135.0 -165.0 663.0 0.249 0.050 0.09942
This report shows the values of each of the parameters, one scenario per row. Since there were three values of μ1
and two values of power, there are a total of six rows in the report.
We were solving for the sample size, N. Notice that the increase in sample size seems to be most directly related
to the difference between the two means. The difference in beta values does not seem to be as influential,
especially at the smaller sample sizes.
414-9
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Note that even though we set the power values at 0.8 and 0.9, these are not the power values that were achieved.
This happens because N can only take on integer values. The program selects the first value of N that gives at
least the values of alpha and power that were desired.
Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the One-Sample Z-Tests procedure window by expanding Means, then One Mean, then clicking
on Z-Test (Inequality), and then clicking on One-Sample Z-Tests. 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 ................................................ μ1 (Search < μ0)
Alternative Hypothesis ............................ Two-Sided (H1: μ ≠ μ0)
Population Size ....................................... Infinite
Power ...................................................... 0.80
Alpha ....................................................... 0.05
N (Sample Size)...................................... 50
μ0 (Null or Baseline Mean) ..................... 3300
σ (Standard Deviation) ........................... 663
Output
Click the Calculate button to perform the calculations and generate the following output.
Diff Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha Beta
0.80000 50 3300.0 3037.3 -262.7 663.0 0.396 0.050 0.20000
414-10
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the One-Sample Z-Tests procedure window by expanding Means, then One Mean, then clicking
on Z-Test (Inequality), and then clicking on One-Sample Z-Tests. 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 (H1: μ ≠ μ0)
Population Size ....................................... Infinite
Power ...................................................... 0.80
Alpha ....................................................... 0.05
μ0 (Null or Baseline Mean) ..................... 1.5
μ1 (Actual Mean) .................................... 2
σ (Standard Deviation) ........................... 1
Output
Click the Calculate button to perform the calculations and generate the following output.
Diff Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha Beta
0.80743 32 1.5 2.0 0.5 1.0 0.500 0.050 0.19257
The sample size of 32 matches Chow, Shao, Wang, and Lokhnygina (2018) exactly.
414-11
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
This section presents the values of each of the parameters needed to run this example. First, from the PASS Home
window, load the One-Sample Z-Tests procedure window by expanding Means, then One Mean, then clicking
on Z-Test (Inequality), and then clicking on One-Sample Z-Tests. 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 ................................................ Sample Size
Alternative Hypothesis ............................ Two-Sided (H1: μ ≠ μ0)
Population Size ....................................... Infinite
Power ...................................................... 0.80
Alpha ....................................................... 0.05
μ0 (Null or Baseline Mean) ..................... 0
μ1 (Actual mean) .................................... 0.2
σ (Standard Deviation) ........................... 1
Output
Click the Calculate button to perform the calculations and generate the following output.
Diff Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha Beta
0.80155 197 0.0 0.2 0.2 1.0 0.200 0.050 0.19845
The sample size of 197 is very close to and just less than Machin’s result for the t-test.
414-12
© NCSS, LLC. All Rights Reserved.