View
218
Download
0
Tags:
Embed Size (px)
Citation preview
Horng-Chyi HorngStatistics II1
Inference on the Variance of a Normal Population (I)
H0: 2 = 0
H1: 2 0 , where 0
is a specified constant. Sampling from a normal distribution with unknown mean
and unknown variance 2, the quantity
has a Chi-square distribution with n-1 degrees of freedom. That is,
2
22 1
Sn
212
22 ~
1
n
Sn
Horng-Chyi HorngStatistics II2
Inference on the Variance of a Normal Population (II)
Let X1, X2, …, Xn be a random sample for a normal distribution with unknown mean and unknown variance 2. To test the hypothesis
H0: 2 = 0
H1: 2 0 , where 0
is a specified constant.
We use the statistic
If H0 is true, then the statistic has a chi-square distribution with n-1 d.f..
Horng-Chyi HorngStatistics II3
k
k
k
xexk
xf xkk
2
addition,In
freedom. of degrees ofnumber theis
0 2/2
1
:ondistributi square-chi of PDF
2
2/12/2/
Horng-Chyi HorngStatistics II4
The Reasoning
For H0 to be true, the value of 02 can not be too large or
too small.
What values of 02 should we reject H0? (based on
value)
What values of 02 should we conclude that there is not
enough evidence to reject H0?
Horng-Chyi HorngStatistics II6
Example 8-11An automatic filling machine is used to fill bottles with liquid detergent. A random sample of 20 bottles results in a sample variance of fill volume of s2 = 0.0153 (fluid ounces)2. If the variance of fill volume exceeds 0.01 (fluid ounces)2, an unacceptable proportion of bottles will be underfilled and overfilled. Is there evidence in the sample data to suggest that the manufacturer has a problem with underfilled and overfilled bottles? Use = 0.05, and assume that fill volume has a normal distribution.
Horng-Chyi HorngStatistics II8
Hypothesis Testing on Variance - Normal Population
H 1 Te s t S ta tis t ic R e je c t H 0 i f
0
2 21,2/1
20
21,2/
20 or nn
> 0
2 21,
20 n
< 0
2
20
220
1
Sn
21,1
20 n
Horng-Chyi HorngStatistics II9
Finding P-Values
Steps:
1. Find the degrees of freedom (k = n-1)in the the 2-table.
2. Compare 02 to the values in that row and find the
closest one.
3. Look the value associated with the one you pick. The p-value of your test is equal to this value.
In example 8-11, 02 = 29.07, k = n-1 = 19, 0.05 < P-Value
< 0.10 because the 2 value associated with (k = 19, = 0.10) is 27.20 while the 2 value associated with (k = 19, = 0.05) is 30.14
Horng-Chyi HorngStatistics II10
P-Values of Hypothesis Testing on Variance
H 1 T e s t S t a t i s t i c P - V a l u e
0
2 20
21
20
21 ,min*2 nn PPP
> 0
2 20
21 nPP
< 0
2
20
220
1
Sn
20
21 nPP
Horng-Chyi HorngStatistics II11
The Operating Characteristic Curves- Chi-square test
Use to performing sample size or type II error calculations. The parameter is defined as:
for various sample sizes n, where denotes the true value of the standard deviation.
Chart VI I,j,k,l are used in chi-square test. (pp. A16-A17)
0
Horng-Chyi HorngStatistics II14
Construction of the C.I. on the Variance
In general, the distribution of
is chi-square with n-1 d.f.
2
22 1
Sn
Use the properties of t with n-1 d.f.,
111
11
1
21,2/1
22
21,2/
2
21,2/2
22
1,2/1
21,2/
221,2/1
nn
nn
nn
SnSnP
SnP
P
Horng-Chyi HorngStatistics II17
Example 8-13 Reconsider the bottle filling machine problem in Example 8-11. Find a 95% upper-C.I. on the variance?
N = 20, s2 = 0.0153
Therefore, 2 (20-1)0.0153/10.117 = 0.0287
The 95% upper-C.I. on the variance is 0.0287.
In addition, the 95% upper-C.I. on the standard deviation is 0.0287 = 0.17.
117.10219,95.0
Horng-Chyi HorngStatistics II18
Inference on a Population Proportion(I)
H0: p = p0
H1: p p0 , where p0 is a specified constant. P = X/n, in which X is a binomial variable, i.e., the number
of success in n trials. E(X) = np, V(X) = npq = np(1-p)
If H0 is true, then using the normal approximation to the binomial, the quantity
follows the standard normal distribution(Z).
n
pp
pP
pnp
npXZ
00
0
00
00
11
Horng-Chyi HorngStatistics II19
Inference on a Population Proportion (II)
Let x be the number of observations in a random sample of size n that belongs to the class associated with p. To test the hypothesis
H0: p = p0
H1: p p0 , where p0 is a specified constant.
We use the statistic
tion.ple proporis the samn
xpwhere
npp
pp
pnp
npxZ
11 00
0
00
00
Horng-Chyi HorngStatistics II20
The Reasoning
For H0 to be true, the value of Z0 can not be too large or too small.
What values of Z0 should we reject H0? (based on value)
What values of Z0 should we conclude that there is not enough evidence to reject H0?
Horng-Chyi HorngStatistics II21
Example 8-14A semiconductor manufacturing produces controllers used in automobile engine applications. The customer erquires that the process fallout or fraction defective at a critical manufacturing step not exceed 0.05 and that the manufacturing demonstrate process capacity at this level of quality using = 0.05. The semiconductor manufacturer takes a random sample of 200 devices and finds that four of them are defective. Can the manufacturer demonstrate process capacity for the customer?
Horng-Chyi HorngStatistics II22
The parameter of interest is the process fraction defective. H0: p = 0.05
H1: p < 0.05
This formulation of the problem will allow the manufacturer to make a strong claim about process capacity if the null hypothesis H0: p = 0.05 is rejected.
= 0.05, x = 4, n = 200, and p0 = 0.05.
To reject H0: p = 0.05, the test statistic Z0 must be less than -z0.05 = -1.645
Conclusion: Since Z0 = -1.95 < -z0.05 = -1.645, we reject H0 and conclude that the process fraction defective p is less than 0.05. The P-value for this value of the test statistic Z0 is P = 0.0256, which is less than = 0.05. We conclude that the process is capable.
95.1
200)95.0(05.0
05.0200/4
1
95.1)95.0)(05.0(200
)05.0(2004
1
00
00
00
00
npp
ppZ
pnp
npxZ
Horng-Chyi HorngStatistics II23
Hypothesis Testing on a Population Proportion
H1 Test Statistic Reject H0 if
p p0 Z0 > z or Z0 < - z
p > p0 Z0 > z
p < p0
npp
ppZ
pnp
npXZ
00
00
00
00
1
or 1
Z0 < -z
Horng-Chyi HorngStatistics II24
P-Values of Hypothesis Testing on a Population Proportion
H1 Test Statistic P-Value
p p0 P = 2*P(Z > |Z0|)
p > p0 P = P(Z > Z0)
p < p0
npp
ppZ
pnp
npXZ
00
00
00
00
1
or 1
P = P(Z < Z0)
Horng-Chyi HorngStatistics II25
How to calculate Type II Error? (I)(H0: p = p0 Vs. H1: p p0)
Under the circumstance of type II error, H0 is false. Supposed that the true value of the population proportion is p. The distribution of Z0 is:
npp
npp
npp
ppN
npp
ppZTherefore
N
npp
ppTrue
/1
/1,
/1~
1 ,
)1,0(~1
0000
0
00
00
Horng-Chyi HorngStatistics II26
How to calculate Type II Error? (II) - refer to section &4.3 (&8.1)
Type II error occurred when (fail to reject H0 while H0 is false)
npp
npp
npp
ppNZZZZ
/)1(
/)1( ,
/)1(~ where
0000
00
20
2
npp
nppZpp
npp
nppZpp
npp
nppZppZ
npp
nppZppP
nppnpp
npp
ppZ
nppnpp
npp
ppZ
nppnpp
npp
ppZ
P
ZZZP
/)1(
/)1(
/)1(
/)1(
/)1(
/)1(
/)1(
/)1(
/)1(/)1(
/)1(
/)1(/)1(
/)1(
/)1(/)1(
/)1(
002/0002/0
002/0002/0
00
00
02/
00
00
00
00
00
02/
2/02/
Therefore,
Horng-Chyi HorngStatistics II27
Formula for Type II Error
Two-sided alternative H1: p p0
One-sided alternative H1: p < p0
One-sided alternative H1: p > p0
npp
nppZpp
npp
nppZpp
/)1(
/)1(
/)1(
/)1( 002/0002/0
npp
nppZpp
/)1(
/)1(1 000
npp
nppZpp
/)1(
/)1( 000
Horng-Chyi HorngStatistics II28
The Sample Size (I)
Given values of and p, find the required sample size n to achieve a particular level of .
2
0
002/
002/0
0002/0
002/0002/0
)1()1(
/)1(
/)1( Then,
Let
0 when /)1(
/)1(
/)1(
/)1(
/)1(
/)1( Since
pp
ppZppZn
npp
nppZppZ
Z
ppnpp
nppZpp
npp
nppZpp
npp
nppZpp
Horng-Chyi HorngStatistics II29
The Sample Size (II)
Two-sided Hypothesis Testing
One-sided Hypothesis Testing
Horng-Chyi HorngStatistics II30
Example 8-15
(1) Consider the semiconductor manufacturer from Example 8-14. Suppose that his process fallout is really p = 0.03. What is the -error for his test of process capacity, which uses n = 200 and = 0.05?
(2) Suppose that the semiconductor manuafcturer was willing to accept a -error as large as 0.10 if the true value of the process fraction defective was p = 0.03. If the manufacturer continue to use = 0.05, what sample size would be required?
Horng-Chyi HorngStatistics II31
(1) Since H1: p < 0.05, therefore
(2) The sample size required for this one-sided alternative is
67.0
)44.0(1
200/)97.0(03.0
200/)95.0(05.0)645.1(03.005.01
/)1(
/)1(1 000
npp
nppZpp
832
05.003.0
)97.0(03.028.1)95.0(05.0645.1
)1()1(
2
2
0
00
pp
ppZppZn
Horng-Chyi HorngStatistics II34
Example 8-16
In a random sample of 85 automobile engine crankshaft bearings, 10 have a surface finish that is rougher than the specifications allow. Construct a 95% C.I. on the population proportion p?
Sol:
19.005.0 85
)88.0(12.096.112.0
85
)88.0(12.096.112.0
)1()1(
95
12.085/10/ ,85
025.0025.0
p
p
n
ppzpp
n
ppzp
p is% C.I. on
nxpn
Horng-Chyi HorngStatistics II35
Choice of Sample Size for C.I. on a Population Proportion
where E is the half-width of the C.I.
Since the max value for p(1-p) is 0.25 for 0 p 1, we can use the following formula instead.
||
ppE