# Test for Population Mean of A Normal Population with Known σ ```Test about a Population Mean
Test for Population Mean of A Normal Population with Known
σ
Null hypothesis:
Test statistic value
H0 : &micro; = &micro;0
x̄−&micro;
√0
z = σ/
n
Alternative Hypothesis
Ha : &micro; &gt; &micro;0
Ha : &micro; &lt; &micro;0
Ha : &micro; 6= &micro;0
Rejection Region for Level α Test
z ≥ zα (upper-tailed test)
z ≤ −zα (lower-tailed test)
z ≥ zα/2 or z ≤ −zα/2 (two-tailed test)
H0 : &micro; = &micro;0 v.s. Ha : &micro; &gt; &micro;0
Then the rejection region for level α test is z ≥ zα , or equivalently
√
x̄ ≥ &micro;0 + zα &middot; σ/ n.
Let &micro;0 denote a particular value of &micro; that is less than the null value
&micro;0 , then
β(&micro;0 ) = P(H0 is not rejected | &micro; = &micro;0 )
√
= P(X &lt; &micro;0 + zα &middot; σ/ n | &micro; = &micro;0 )
X − &micro;0
&micro;0 − &micro; 0
0
√ &lt; zα +
√ |&micro;=&micro;
=P
σ/ n
σ/ n
&micro;0 − &micro; 0
√
= Φ zα +
σ/ n
Alternative Hypothesis
Ha : &micro; &gt; &micro;0
Ha : &micro; &lt; &micro;0
Ha : &micro; 6= &micro;0
Type II Error Probability β(&micro;0 ) for Level α Test
0
√
Φ zα + &micro;σ/0 −&micro;
n
0
&micro;0 −&micro;
1 − Φ −zα + σ/√n
0
√
Φ zα/2 + &micro;σ/0 −&micro;
−
Φ
−zα/2 +
n
0
&micro;0 −&micro;
√
σ/ n
Test for Population Mean of A Normal Population with
Unknown σ
Null hypothesis:
Test statistic value
H0 : &micro; = &micro;0
√0
t = x̄−&micro;
s/ n
Alternative Hypothesis
Ha : &micro; &gt; &micro;0
Ha : &micro; &lt; &micro;0
Ha : &micro; 6= &micro;0
Rejection Region for Level α Test
t ≥ tα,n−1 (upper-tailed test)
t ≤ −tα,n−1 (lower-tailed test)
t ≥ tα/2,n−1 or t ≤ −tα/2,n−1 (two-tailed test)
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.
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).
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
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
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.
1. Parameter of interest: population proportion p.
2. Null hypothesis: H0 : p = 0.70.
1. Parameter of interest: population proportion p.
2. Null hypothesis: H0 : p = 0.70.
3. Alternative hypothesis: 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:
p̂ − p0
0.62 − 0.70
z=p
=p
= −2.469
p0 (1 − p0 )/n
0.70(1 − 0.70)/200
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:
p̂ − p0
0.62 − 0.70
z=p
=p
= −2.469
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.
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:
p̂ − p0
0.62 − 0.70
z=p
=p
= −2.469
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.
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).
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 )
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?
1. Parameter of interest: proportion for “Heads” p.
1. Parameter of interest: proportion for “Heads” p.
2. Null hypothesis: H0 : p = 0.5.
1. Parameter of interest: proportion for “Heads” p.
2. Null hypothesis: H0 : p = 0.5.
3. Alternative hypothesis: Ha : p &gt; 0.5.
1. Parameter of interest: proportion for “Heads” p.
2. Null hypothesis: H0 : p = 0.5.
3. Alternative hypothesis: Ha : p &gt; 0.5.
4. Test statistic: X = number of heads.
1. Parameter of interest: proportion for “Heads” p.
2. Null hypothesis: H0 : p = 0.5.
3. Alternative hypothesis: Ha : p &gt; 0.5.
4. Test statistic: X = number of heads.
5. Rjection region: X ≥ c for some c.
1. Parameter of interest: proportion for “Heads” p.
2. Null hypothesis: H0 : p = 0.5.
3. Alternative hypothesis: Ha : p &gt; 0.5.
4. Test statistic: X = number of heads.
5. Rjection region: X ≥ c for some c.
6. Significance level:
0.10 ≥ P(type I error) = P(reject H0 | H0 )
= P(X ≥ c | p = 0.5) = 1 − P(X &lt; c | p = 0.5)
= 1 − P(X ≤ c − 1 | p = 0.5) = 1 − B(c − 1; 10, 0.5)
Therefore c − 1 = 7 and c = 8.
1. Parameter of interest: proportion for “Heads” p.
2. Null hypothesis: H0 : p = 0.5.
3. Alternative hypothesis: Ha : p &gt; 0.5.
4. Test statistic: X = number of heads.
5. Rjection region: X ≥ c for some c.
6. Significance level:
0.10 ≥ P(type I error) = P(reject H0 | H0 )
= P(X ≥ c | p = 0.5) = 1 − P(X &lt; c | p = 0.5)
= 1 − P(X ≤ c − 1 | p = 0.5) = 1 − B(c − 1; 10, 0.5)
Therefore c − 1 = 7 and c = 8.
7. Conclusion: since 6 &lt; 7, we fail to reject H0 .
P-value
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?
P-value
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?
Hypothesis: H0 : p = 0.70 v.s. Ha : p 6= 0.70.
Value of the test statistic:
p̂ − p0
0.62 − 0.70
z=p
=p
= −2.469
p0 (1 − p0 )/n
0.70(1 − 0.70)/200
Significance Level
.05
.02
.01
.002
z
z
z
z
Rejection Region
≥ 1.96 or z ≤ −1.96
≥ 2.33 or z ≤ −2.33
≥ 2.58 or z ≤ −2.58
≥ 3.08 or z ≤ −3.08
Conclusion
Reject H0
Reject H0
Fail to reject H0
Fail to reject H0
P-value
Definition
The P-value (or observed significance level) is the smallest level of
significance at which H0 would be rejected when a specified test
procedure is used on a given data set. Once the P-value has been
determined, the conclusion at any partivular level α results from
comparing the P-value to α:
1. P-value ≤ α ⇒ reject H0 at level α.
2. P-value &gt; α ⇒ fail to reject H0 at level α.
Convention: it is customary to call the data significant when H0 is
rejected and not significant otherwise.
P-value
An equivalent definition for P-value:
Definition
The P-value is the probability calculated assuming H0 is true, of
obtaining a test statistic value at least as contradictory to H0 as
the value that actually resulted. The smaller the P-value, the more
contradictory is the data to H0 .
P-value
P-value for z Tests


for an upper-tailed test
1 − Φ(z)
P = Φ(z)
for a lower-tailed test


2[1 − Φ(|z|)] for a two-tailed test
where Φ(z) is the cdf for standard normal rv.
P-value
P-value
Example:
To determine whether the pipe welds in a nuclear power plant
meet specifications, a random sample of 10 welds is selected, and
tests are conducted on each weld in the sample. The sample data
is recorded as follows
101.9 100.4 101.2 100.9 101.7
with X = 101.10.
101.5 100.9 100.1 101.6 100.8
It is known that the weld strength is normally distributed with
mean &micro; and standard deviation σ = 2. If the specifications state
that the mean strength should be greater than 100 lb/in2 , shall
we accept that the pipe welds meet the specifications?
```