One-Sample - Z-Tests 9 Research
One-Sample - Z-Tests 9 Research
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.
Rejecting 𝐻𝐻0 implies that the mean is not equal to the value 𝜇𝜇0 . The hypotheses for one-sided upper-tail
tests are
Rejecting 𝐻𝐻0 implies that the mean is larger than the value 𝜇𝜇0 . This test is called an upper-tail test because 𝐻𝐻0
is rejected in samples in which the sample mean is larger than 𝜇𝜇0 .
The lower-tail test is
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.
𝑋𝑋� − 𝐴𝐴
𝑧𝑧 =
𝜎𝜎⁄√𝑛𝑛
where
∑𝑛𝑛𝑖𝑖=1 𝑋𝑋𝑖𝑖
𝑋𝑋� =
𝑛𝑛
and 𝐴𝐴 is the value of the mean hypothesized by the null hypothesis that incorporates both 𝜇𝜇0 and 𝑀𝑀𝑁𝑁𝑁𝑁 .
The significance of the test statistic is determined by computing the p-value. If this p-value is less than a
specified level (usually 0.05), the hypothesis is rejected. Otherwise, no conclusion can be reached.
414-3
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Population Size
This is the number of subjects in the population. Usually, you assume that samples are drawn from a very
large (infinite) population. Occasionally, however, situations arise in which the population of interest is of
limited size. In these cases, appropriate adjustments must be made.
When a finite population size is specified, the standard deviation is reduced according to the formula:
𝑛𝑛
𝜎𝜎12 = �1 − � 𝜎𝜎 2
𝑁𝑁
where n is the sample size, N is the population size, 𝜎𝜎 is the original standard deviation, and 𝜎𝜎1 is the new
standard deviation.
𝑛𝑛
The quantity n/N is often called the sampling fraction. The quantity �1 − � is called the finite population
𝑁𝑁
correction factor.
4. Power = 1 − Φ(𝑧𝑧1 ).
414-4
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
If the procedure window is not already open, use the PASS Home window to open it. The parameters for this
example are listed below and are stored in the Example 1 settings file. To load these settings to the
procedure window, click Open Example Settings File in the Help Center or File menu.
414-5
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Output
Click the Calculate button to perform the calculations and generate the following output.
Numeric Reports
Numeric Results
─────────────────────────────────────────────────────────────────────────
Solve For: Power
Hypotheses: H0: μ = μ0 vs. H1: μ ≠ μ0
─────────────────────────────────────────────────────────────────────────
Mean
Sample ──────────────────── Standard
Size Null Actual Difference Deviation Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
0.07256 20 100 110 10 40 0.25 0.01
0.15996 40 100 110 10 40 0.25 0.01
0.26130 60 100 110 10 40 0.25 0.01
0.36702 80 100 110 10 40 0.25 0.01
0.46978 100 100 110 10 40 0.25 0.01
0.56466 120 100 110 10 40 0.25 0.01
0.20096 20 100 110 10 40 0.25 0.05
0.35261 40 100 110 10 40 0.25 0.05
0.49069 60 100 110 10 40 0.25 0.05
0.60878 80 100 110 10 40 0.25 0.05
0.70542 100 100 110 10 40 0.25 0.05
0.78191 120 100 110 10 40 0.25 0.05
0.30202 20 100 110 10 40 0.25 0.10
0.47523 40 100 110 10 40 0.25 0.10
0.61489 60 100 110 10 40 0.25 0.10
0.72286 80 100 110 10 40 0.25 0.10
0.80378 100 100 110 10 40 0.25 0.10
0.86298 120 100 110 10 40 0.25 0.10
─────────────────────────────────────────────────────────────────────────
Power The probability of rejecting a false null hypothesis when the alternative hypothesis is true.
N The size of the sample drawn from the population.
μ0 The value of the population mean under the null hypothesis.
μ1 The actual value of the population mean at which power and sample size are calculated.
μ1 - μ0 The difference between the actual and null means.
σ The standard deviation of the population. It measures the variability in the population.
Effect Size The relative magnitude of the effect. Effect Size = |μ1 - μ0|/σ.
Alpha The probability of rejecting a true null hypothesis.
Summary Statements
─────────────────────────────────────────────────────────────────────────
A single-group design will be used to test whether the mean is different from 100 (H0: μ = 100 versus H1: μ ≠ 100).
The comparison will be made using a two-sided, one-sample Z-test, with a Type I error rate (α) of 0.01. The
(known) standard deviation is assumed to be 40. To detect a mean of 110 (corresponding to a difference of 10)
with a sample size of 20, the power is 0.07256.
─────────────────────────────────────────────────────────────────────────
414-6
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
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.
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.
─────────────────────────────────────────────────────────────────────────
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.
414-7
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Plots Section
Plots
─────────────────────────────────────────────────────────────────────────
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
If the procedure window is not already open, use the PASS Home window to open it. The parameters for this
example are listed below and are stored in the Example 2 settings file. To load these settings to the
procedure window, click Open Example Settings File in the Help Center or File menu.
414-9
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Output
Click the Calculate button to perform the calculations and generate the following output.
Numeric Results
─────────────────────────────────────────────────────────────────────────
Solve For: Sample Size
Hypotheses: H0: μ = μ0 vs. H1: μ ≠ μ0
─────────────────────────────────────────────────────────────────────────
Mean
Sample ───────────────────── Standard
Size Null Actual Difference Deviation Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha
───────────────────────────────────────────────────────────────────────────────────────────────────────────────
0.86171 6 3300 2475 -825 663 1.244 0.05
0.90861 7 3300 2475 -825 663 1.244 0.05
0.80391 32 3300 2970 -330 663 0.498 0.05
0.90387 43 3300 2970 -330 663 0.498 0.05
0.80085 127 3300 3135 -165 663 0.249 0.05
0.90058 170 3300 3135 -165 663 0.249 0.05
─────────────────────────────────────────────────────────────────────────
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.
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.
414-10
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
If the procedure window is not already open, use the PASS Home window to open it. The parameters for this
example are listed below and are stored in the Example 3 settings file. To load these settings to the
procedure window, click Open Example Settings File in the Help Center or File menu.
Output
Click the Calculate button to perform the calculations and generate the following output.
Numeric Results
─────────────────────────────────────────────────────────────────────────
Solve For: μ1 (Search < μ0)
Hypotheses: H0: μ = μ0 vs. H1: μ ≠ μ0
─────────────────────────────────────────────────────────────────────────
Mean
Sample ───────────────────── Standard
Size Null Actual Difference Deviation Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
0.8 50 3300 3037.3 -262.7 663 0.396 0.05
─────────────────────────────────────────────────────────────────────────
414-11
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
If the procedure window is not already open, use the PASS Home window to open it. The parameters for this
example are listed below and are stored in the Example 4 settings file. To load these settings to the
procedure window, click Open Example Settings File in the Help Center or File menu.
Output
Click the Calculate button to perform the calculations and generate the following output.
Numeric Results
─────────────────────────────────────────────────────────────────────────
Solve For: Sample Size
Hypotheses: H0: μ = μ0 vs. H1: μ ≠ μ0
─────────────────────────────────────────────────────────────────────────
Mean
Sample ──────────────────── Standard
Size Null Actual Difference Deviation Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
0.80743 32 1.5 2 0.5 1 0.5 0.05
─────────────────────────────────────────────────────────────────────────
The sample size of 32 matches Chow, Shao, Wang, and Lokhnygina (2018) exactly.
414-12
© NCSS, LLC. All Rights Reserved.
PASS Sample Size Software NCSS.com
One-Sample Z-Tests
Setup
If the procedure window is not already open, use the PASS Home window to open it. The parameters for this
example are listed below and are stored in the Example 5 settings file. To load these settings to the
procedure window, click Open Example Settings File in the Help Center or File menu.
Output
Click the Calculate button to perform the calculations and generate the following output.
Numeric Results
─────────────────────────────────────────────────────────────────────────
Solve For: Sample Size
Hypotheses: H0: μ = μ0 vs. H1: μ ≠ μ0
─────────────────────────────────────────────────────────────────────────
Mean
Sample ──────────────────── Standard
Size Null Actual Difference Deviation Effect
Power N μ0 μ1 μ1 - μ0 σ Size Alpha
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
0.80155 197 0 0.2 0.2 1 0.2 0.05
─────────────────────────────────────────────────────────────────────────
The sample size of 197 is very close to and just less than Machin’s result for the t-test.
414-13
© NCSS, LLC. All Rights Reserved.