# Test about a Population Proportion

```Test about a Population Proportion
Let p denote the proportion of individuals or objects in a
population who possess a specified property (labeled as “S”).
Let X be the number of S’s in the sample. Then p̂ = Xn is the
sample proportion.
X is a binomial random variable with parameters p and n, i.e.
X ∼ Bin(n, p).
Furthermore, when the sample size n itself is large, both X and p̂
are approximately normally distributed, i.e. X ∼ N(np, np(1 − p))
).
and p̂ ∼ N(p, p(1−p)
n
Test about population proportion p will depend on the sample size.
Large-Sample Tests
When the sample size is large (n ≥ 30), p̂ is approximately
normally distributed with mean p and variance p(1 − p)/n. In
particular, under the null hypothesis H0 : p = p0 , p̂ is
approximately normally distributed with mean p0 and variance
p0 (1 − p0 )/n, i.e. p̂ ∼ N(p0 , p0 (1 − p0 )/n).
Therefore the test statistic
p̂ − p0
Z=p
p0 (1 − p0 )/n
has approximately a standard normal distribution.
Example: Problem 35
State DMV records indicate that of all vehicles undergoing
emissions testing during the previous year, 70% passed on the first
try. A random sample of 200 cars tested in a particular county
during the current year yields 124 that passed on the initial test.
Does this suggest that the true proportion for this county during
the current year differs from the previous statewide proportion?
Test the relevant hypotheses using significance level α = 0.5
In this case, p̂ = 124/200 = 0.62.
The null hypothesis is H0 : p = 0.70 and the alternative hypothesis
is Ha : p 6= 0.70.
1. Parameter of interest: population proportion p.
2. Null hypothesis: H0 : p = 0.70.
3. Alternative hypothesis: Ha : p 6= 0.70.
4. Test statistic value:
0.62 − 0.70
p̂ − p0
=p
= −2.469
z=p
p0 (1 − p0 )/n
0.70(1 − 0.70)/200
5. Rejection region: z ≥ z0.025 or z ≤ −z0.025 , where z0.025 = 1.96.
6. Conclusion: since −2.469 &lt; −1.96, we reject H0 .
Summary for large-sample tests for population proportion p
Null hypothesis: H0 : p = p0
Test statistic value: z = √ p̂−p0
p0 (1−p0 )/n
Alternative Hypothesis
Ha : p &gt; p0
Ha : p &lt; p0
Ha : p 6= p0
Rejection Region
z ≥ zα (upper-tailed)
z ≤ −zα (lower-tailed)
either z ≥ zα/2 or z ≤ −zα/2 (two-tailed)
Remark: These test procedures are valid provided that np0 ≥ 10
and n(1 − p0 ) ≥ 10.
Type II Error β for large-sample tests
Alternative Hypothesis
β(p 0 )
Ha : p &gt; p0
Φ
p0 −p 0 +zα
√
Ha : p &lt; p0
1−Φ
Ha : p &gt; p0
Φ
Φ
p0 −p 0 −zα
√
√
p0 (1−p0 )/n
p 0 (1−p 0 )/n
p0 −p 0 +zα/2
√
√
p0 (1−p0 )/n
p 0 (1−p 0 )/n
√
p0 (1−p0 )/n
p 0 (1−p 0 )/n
p0 −p 0 −zα/2
√
√
p0 (1−p0 )/n
p 0 (1−p 0 )/n
−
Small-Sample Tests
When the sample size n is small (n ≤ 30), we test the hypotheses
based directly on the binomial distribution.
For example, if the null hypothesis is H0 : p = p0 and the
alternative hypothesis is Ha : p &gt; p0 , then the rejection region is of
the form X ≥ c, where X ∼ Bin(n, p).
P(type I error) = P(reject H0 | H0 ) = P(X ≥ c | p = p0 )
= 1 − P(X &lt; c | p = p0 ) = 1 − P(X ≤ c − 1 | p = p0 )
= 1 − B(c − 1; n, p0 )
And
P(type II error) = P(fail to reject H0 | p = p 0 ) = P(X &lt; c | p = p 0 )
= P(X ≤ c − 1 | p = p 0 ) = B(c − 1; n, p 0 )
Small-Sample Tests
Remark: in the samll-sample case, it is usually not possible to find
a vale c for which P(type I error) is exactly the desired significance
level α. Therefore we choose the largest rejection region which
statisfying
P(type I error) &lt; α.
Example:
A coin is tossed 10 times and x = 6 heads are observed. Let
significance level 0.10?