WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Sample Size Calculation - Proportions

one-sided test
two-sided test
estimated proportion of population defective
p
0.5
the size of the change in proportion defective to be detected
δ
0.05
(α,β)
α: risk of rejecting
H
0
when true
5.%
1-α: confidence
95.%
β: risk of accepting
H
0
when false
10.%
1-β: power of the test
90.%
p: estimated proportion defective
50.%
n: sample size
1054
This Demonstration uses a normal approximation to the binomial distribution to estimate the minimum sample size,
n
, for detecting a change in the proportion of a population with a particular characteristic (the proportion defective, for example). The sample size,
n
, needed to detect a change of size
δ
in the proportion defective, at a confidence level of
1-α
and with a power of
1-β
depends on
δ
,
α
,
β
, and whether the test is one-sided or two-sided. To compare various sampling approaches, you can vary
α
(the type I risk),
β
(the type II risk),
δ
(the minimum size of change to be detected), as well as
p
(the known, or estimated, proportion defective in the population). Note that
q=1-p
. In many practical cases, the proportion defective is not known, but is estimated from prior sampling or experience.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.