BE 2100 Ch 8 F2014(1) (1)
-
Upload
approachtheprob -
Category
Documents
-
view
220 -
download
0
Transcript of BE 2100 Ch 8 F2014(1) (1)
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
1/52
Chapter 8
Tests of Hypotheses
1
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
2/52
Relationship: Confidence Interval
and Test of Hypothesis
Two general methods for making inferenceabout population parameters
confidence interval (estimating their values)
hypothesis testing (making decisions about
them)
2
8.1
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
3/52
Elements of a Statistical Test
1) Null Hypothesisto be rejected or not rejected
2) Alternative Hypothesis- not equal, greater
than, less than. Used mainly to define rejection
region as one-sided or two-sided
3) Test Statisticcalculated from sample data
4) Rejection Regionvalues of test statistic that
will imply rejection5) Conclusiondecision made to whether accept
or reject the null hypothesis
3
8.2
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
4/52
Conclusions and Consequences
DecisionTruth
Ho is true Ho is false
Retain Ho (fail toreject) Correct decision Type II error ()
Reject Ho Type I error () Correct decision
You are trying to detect a departure from Ho.
You cant prove Ho is true.
4
8.2
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
5/52
Hypotheses
H0: equal
Ha: less than, not
equal, or greater than
One-tailed or two-tailed
is a decision basedon assumed
alternative
Example:
H0: m = m0
Ha: m m0or
Ha: m m0
orHa: m m0
5
8.2
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
6/52
Reject Region
6
8.2
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
7/52
Note
Failure to Reject is NOT Equivalent to Accept(different than what book says)
Just as a court decision of NOT GUILTY does notmean INNOCENT
The powerof a statistical test, (1-), is the
probability of rejecting the null hypothesis Howhen in fact, Hois false
7
8.2
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
8/52
Example 8.5 (p.344)1. Null Hypothesis H0 = 72
2. Alternative Hypothesis. Concerned that traffic volume
might be greater so Ha: > 72
3. Test Statistic
calculated from sample data
4. Rejection Region Z0> 1.28 (from Normal table)
Decision: reject or not reject H0?
12.1
50
3.13
721.7472
0 =
=
=
ns
yZ
8
8.3
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
9/52
Note
Choose H0 and Ha before obtaining data
to avoid bias
Statistical Significance does NOT equal to
PRACTICALSignificance
9
8.4
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
10/52
Testing Population Mean
Large Sample (n 30)
1. Define null hypothesis
2. Define alternativethis specifies one-tailed or two-tailed & location of rejection
region
3. Calculate Z values for rejection region4. Calculate average of data set
10
8.5
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
11/52
Testing Population Mean -
Large Sample continued
5. Calculate standard deviat ion of data
6. Convert observed average into Z-score
7. Compare to Z rejection region. Make
decision
11
8.5
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
12/52
Example 8.8 page 348
1. Define null hypothesis H0: m= 8.5
2. Define alternativethis specifies one-tailed or
two-tailed & location of rejection region
Ha: m8.5
3. Look up Z values for rejection region.For = .01, find z = 2.58
4. Calculate average o f data. 2579.y=
12
8.5
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
13/52
Example 8.8 continued
5. Calculate standard deviat ion of data.
s = 1.203
6. Convert observed data into Z-score
7. z
8. Compare to Z rejection region
Decision is to reject or not reject H0
?
03.4
41
203.1
5.8256.90 =
=
ns
y m
13
8.5
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
14/52
Decision
Figure 8.6
Rejection region for
Example 8.8
14
8.5
8 6
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
15/52
The Observed Significance Level
for a Test
The observed sign i f icance level orp-value,
for a specific statistical test is the probability
(assuming Hois true) of observing a value of thetest statistic that is at least as contradictory to
the null hypothesis, and supportive of the
alternative hypothesis, as the one computed
from the sample data
Not to be confused withpfrom Binomial
15
8.6
8 6
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
16/52
Large Sample Tests
Let z0= computed value of test statistic.
Identify probability that corresponds to zc
Determine: p-value =
P (z > z0) if upper-tailed
P (z < z0) if lower-tailed
2 P (z > |z0|) if two-tailed
Ifp-value exceeds , there is insufficientevidence to reject Ho
Ifp-value is less than the maximum value ,
reject Ho16
8.6
8 6
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
17/52
Example 8.10
Determine p-value = P (z > z0) for upper-
tailed test.
P (z > 1.12) = .5 - .3686 = 0.1314
17
8.6
8 6
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
18/52
Review - Example 8.9 page 351
1. Define Hypothesis H0: m= 1
2. Define alternativethis specifies one-tailed ortwo-tailed & location of rejection region.
Ha:m> 1
3.Look up t values for rejection region and
degrees of freedom. For = .05 and samplesize of 20, find t.05, 19= 1.729
4. Calculate average o f data. ybar = 2.14318
8.6
8 6
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
19/52
Example 8.9 continued
5. Calculate standard deviat ion of data.
s = 1.736
6. Convert observed average into t-score
= (2.143 - 1)/(1.7/20) = 2.957. Compare to t rejection region. Make decision.
Decision is to reject or not reject H0?
ns
yT 01
m=
19
8.6
8 6
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
20/52
Observed Significance Level
Test statistic t = 2.95
Find corresponding p-value
What portion of the curve is beyond t19= 2.95?From Table 7, its between 2.861 and 3.579 for
.005 and .001 respectively.
May approximate to the higher value of .005 Sincep-value (.005) is less than value (.05),
reject Ho
20
8.6
8 6
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
21/52
Small Sample Test
Let t0= computed value of test statistic.
Identify probability that corresponds to t0
t tables are incomplete.Determine p-value =
P (t > t0) if upper-tailed
P (t < t0) if lower-tailed
2 P (t > |t0|) if two-tailed
21
8.6
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
22/52
Testing the Difference Between Two
Population Means: Independent Samples Hypothesis
H0: 1- 2= 0
Ha: 1> 2 or 1- 2> 0 Could have 1- 2= D0 non-zero value Key challenge as in estimation
Determine standard deviation of difference We assume Independent Samples
22
8.7
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
23/52
Large Sample Test
One-Tailed Test
H0: 1- 2= D0
Ha: 1- 2> D0 (or Ha: 1- 2< D0)
Two-Tailed Test
H0: 1- 2= D0
Ha: 1- 2D0
23
8.7
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
24/52
Hypothesis About 1- 2 continued
Test Statistic: Z
Rejection region:One-Tailed Test z > z
(or z < -z)
Two-Tailed Test z > z/2
Assumptions
Large samples
Independent samples
=
2
2
2
1
2
1
021
021
21
n
s
n
sDyy
DyyZ
yy
24
8.7
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
25/52
Example 8.13
New vs. Old Process
H0: 1- 2= D0
Ha: 1- 2< D0 Find -z.05 = -1.645
Calculate Z:
Decision?Accept Ho
=
2
2
2
1
2
1
021
ns
ns
DyyZ
25
8.7
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
26/52
Small Sample Test:
t Distribution One-Tailed Test
H0: 1- 2= D0
Ha: 1- 2> D0 (or Ha: 1- 2< D0)
Two-Tailed Test
H0: 1- 2= D0
Ha: 1- 2D0
26
8.7
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
27/52
Small Sample Test: t Distributioncontinued
Test Statistic:
Rejection regionOne-Tailed Test
t > t, n1 + n2 - 2
(or t < -t) Two-Tailed Test
t > t/2, n1 + n2 - 2
=
21
2
021
11
nns
DyyT
p
Assumptions:
1. normal populations
2. independent samples
3. equal variance
27
8.7
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
28/52
Pooled Standard Deviation sp
2
2
2
1assumewewhere =
= 2
11
21
2
22
2
112
nn
snsn
sp
28
8.7
8 7
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
29/52
No Common Variance
Page 361: no common variance but
equal sized samplesuse unpooled
estimate of standard deviation butcomplicated formula for degrees of
freedom
29
8.7
8 8
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
30/52
Test: Difference MATCHED pairs
Relatively straightforward:
Convert all data to the difference d and
treat it as a single variable.Use either large or small sample formula.
30
8.8
8 8
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
31/52
MATCHEDPairs
Convert all of your data to difference
between two values of matched pair.
Carry out all of your analysis on this newcolumn of data.
Calculate its average value
Calculate its standard deviation
31
8.8
8.8
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
32/52
Hypothesis Matched Pair
One-Tailed Test
H0: d = D0
Ha: d > D0 (or Ha: d < D0)
Two-Tailed Test
H0: d = D0
Ha: d D0
32
8.8
8.8
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
33/52
Matched Pair Large Sample
Test Statistic for n>30:
Rejection region
One-Tailed Test z > z (or z < -z)
Two-Tailed Test z > z/2
ns
DdZ
d
0=
33
8.8
8.8
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
34/52
Matched Pair Small Sample
Test Statistic for n t, n-1 (or t < -t)
Two-Tailed Test t > t/2, n-1
ns
DdT
d
0
=
34
8 8
8.8
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
35/52
Example 8.15H0: d = D0
Ha: d > D0
One-Tailed Test t > t, 5 = 2.015
Decision?
Reject H0
See Figure 8.17 p.366
- review Minitab printout
01.30 == nsDdT d
35
8.9
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
36/52
Testing a Population Proportion
One-Tailed Test
H0: p = p0
Ha: p > p0 (or Ha: p < p0)
Two-Tailed Test
H0: p = p0
Ha: p p0
36
8.9
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
37/52
Population Proportion
Test Statistic:
Rejection region
One-Tailed Test z > z (or z < -z)
Two-Tailed Test z > z/2
Assumption:
n
qp
ppz
00
0
=
37
4,4 qnpn
8.9
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
38/52
Example 8.16
Hypothesis
H0: p = .95
Ha: p < .95 Test Statistic:
= (.9 - .95)/[(.95*.05)/60] = -1.78 Rejection region z < -z= -1.645 Decision?
Reject Ho
nqp
ppz
00
0
=
38
8.10
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
39/52
Testing the Difference between two
Population Proportions One-Tailed Test
H0: p1- p2= D0
Ha: p1- p2> D0 (or Ha: p1- p2< D0)
Two-Tailed Test
H0: p1- p2= D0Ha: p1- p2D0
39
8.10
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
40/52
Difference in Population Proportions
Test Statistic:
where
and rejection region is
|z| > z /2
21
021
pp
Dppz
=
2
22
1
11
21 n
qp
n
qp
pp
40
8.10
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
41/52
Difference in Population Proportions
Rejection region
One-Tailed Test: z > z (or z < -z)
Two-Tailed Test: z > z/2
To justify normality assumption:
41
4,44
,4
2222
1111
qnpnqnpn
8.10
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
42/52
If D0= 0
When D0= 0p1= p2= p standard deviation formula simplifies
21
11
21 nnqppp
Test Statistic:
where
and rejection region is
|z| > z /2
21
021
pp
Dpp
z
=
42
8.10
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
43/52
Example 8.17
Hypothesis
H0: p1- p2= 0
Ha: p1- p2< 0 Test Statistic:
where
21
21 0
pp
ppz
=
21
11
21 nnqppp
43
8.10
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
44/52
Example 8.17 continued
so test statistic z = -3.56
35115002000576652
3841500576
3262000652
2
1
.))/((p
./p
./p
==
==
==
44
0163.01500
1
2000
1649.351.
11
21
21=
=
nn
qppp
56.3
0163.0
058.0
0163.0
0384.326.0
21
21 ====pp
ppz
8.10
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
45/52
Example 8.17 continued
Rejection region
One-Tailed Test z < -z= -1.645
Test statistic z = -3.56
Decision? Reject Hosince Z is less than -Z
45
8.11
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
46/52
Testing a Population Variance
Chi-square 2 when sample is selectedfrom a normal population
From last chapter:
2= (n-1)s2/2
Chi-Square distribution (Asymmetric) with
n-1 degrees of freedom
46
8.11
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
47/52
Confidence Intervals and Hypothesis
Testing on Population Variance
(1-)100% Confidence Interval for 2 is
(n-1)s2/ 2/2 2(n-1)s2/ 2(1-/2)
(page 306)
Assumption: Population has approximate
normal distribution
What would you expect test statistic to be forH0: 2= 02 Ha: 2> 02 ? (see p.376)
47
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
48/52
Confidence Intervals and Hypothesis
Testing on Population Variance
22
0
2
0
2
2
0
2
0
:
:
=
aH
H
2
1
2
0
2
0
2
2
0
2
0
:
:
=
aH
H
222
1
2
2
0
2
2
0
2
0
22
0
or0
:
:
=
aH
H
Where:
20 = (n-1)s2/ 02
8.11
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
49/52
Example 8.18
H0: 02= .01 Ha: 2 < .01
20 = (n-1)s2/ 02
Smaller value of s2 we observe strongerthe evidence in favor of alternate
hypothesis
So, reject H0 for small values of teststatistic
49
8.12
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
50/52
Testing the Ratio of Two Population
Variances
Hypothesis
One-Tailed H0: 12/ 22= 1
Ha: 12/ 22> 1 (or Ha: 12/ 22< 1)Two-Tailed H0: 12/ 22= 1
H0: 12/ 221
50
8.12
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
51/52
Test Statistic
F-Distribution
One-sided F = s12/s2
2 (orF = s22/s1
2)
Two-sided F =Larger s2/Smaller s2
Rejection region
One-sided F > F
Two-sided F > F/2
51
8.12
-
8/10/2019 BE 2100 Ch 8 F2014(1) (1)
52/52
Example 8.19 (p.380)
H0: 12
/ 22
= 1H0: 12/ 221
Only upper-tail values of F are in table so always
put larger variance on top
F =larger s2/smaller s2 = s22/s1
2= 2.58
What are degrees of freedom for this example?
n1= 18 n2= 13
Review the rest of the problem on your own