Walpole Ch-10 KZ
Walpole Ch-10 KZ
Bangladesh University of Eng. & Tech. Slide 1 of 108 Industrial &Production Engineering
Outline
• Statistical Hypotheses: General Concepts
• Testing a Statistical Hypothesis
• The Use of P -Values for Decision Making in Testing Hypotheses
• Single Sample: Tests Concerning a Single Mean
• Two Samples: Tests on Two Means
• Choice of Sample Size for Testing Means
• One Sample: Test on a Single Proportion
• Two Samples: Tests on Two Proportions
• One- and Two-Sample Tests Concerning Variances
• Goodness-of-Fit Test
• Test for Independence (Categorical Data)
• Test for Homogeneity
Bangladesh University of Eng. & Tech. Slide 2 of 108 Industrial &Production Engineering
1
8/24/2023
Bangladesh University of Eng. & Tech. Slide 3 of 108 Industrial &Production Engineering
Bangladesh University of Eng. & Tech. Slide 4 of 108 Industrial &Production Engineering
2
8/24/2023
Bangladesh University of Eng. & Tech. Slide 5 of 108 Industrial &Production Engineering
Bangladesh University of Eng. & Tech. Slide 6 of 108 Industrial &Production Engineering
3
8/24/2023
Bangladesh University of Eng. & Tech. Slide 7 of 108 Industrial &Production Engineering
Bangladesh University of Eng. & Tech. Slide 8 of 108 Industrial &Production Engineering
4
8/24/2023
Bangladesh University of Eng. & Tech. Slide 9 of 108 Industrial &Production Engineering
Bangladesh University of Eng. & Tech. Slide 10 of 108 Industrial &Production Engineering
10
5
8/24/2023
Bangladesh University of Eng. & Tech. Slide 11 of 108 Industrial &Production Engineering
11
Bangladesh University of Eng. & Tech. Slide 12 of 108 Industrial &Production Engineering
12
6
8/24/2023
Bangladesh University of Eng. & Tech. Slide 13 of 108 Industrial &Production Engineering
13
Bangladesh University of Eng. & Tech. Slide 14 of 108 Industrial &Production Engineering
14
7
8/24/2023
Bangladesh University of Eng. & Tech. Slide 15 of 108 Industrial &Production Engineering
15
Bangladesh University of Eng. & Tech. Slide 16 of 108 Industrial &Production Engineering
16
8
8/24/2023
Bangladesh University of Eng. & Tech. Slide 17 of 108 Industrial &Production Engineering
17
Bangladesh University of Eng. & Tech. Slide 18 of 108 Industrial &Production Engineering
18
9
8/24/2023
Bangladesh University of Eng. & Tech. Slide 19 of 108 Industrial &Production Engineering
19
Bangladesh University of Eng. & Tech. Slide 20 of 108 Industrial &Production Engineering
20
10
8/24/2023
Bangladesh University of Eng. & Tech. Slide 21 of 108 Industrial &Production Engineering
21
22
11
8/24/2023
Bangladesh University of Eng. & Tech. Slide 23 of 108 Industrial &Production Engineering
23
24
12
8/24/2023
Bangladesh University of Eng. & Tech. Slide 25 of 108 Industrial &Production Engineering
25
Bangladesh University of Eng. & Tech. Slide 26 of 108 Industrial &Production Engineering
26
13
8/24/2023
27
28
14
8/24/2023
Bangladesh University of Eng. & Tech. Slide 29 of 108 Industrial &Production Engineering
29
Bangladesh University of Eng. & Tech. Slide 30 of 108 Industrial &Production Engineering
30
15
8/24/2023
31
Example 1
Bangladesh University of Eng. & Tech. Slide 32 of 108 Industrial &Production Engineering
32
16
8/24/2023
Example 2
Bangladesh University of Eng. & Tech. Slide 33 of 108 Industrial &Production Engineering
33
• How does the use of p-values differ from classic hypothesis testing?
Bangladesh University of Eng. & Tech. Slide 34 of 108 Industrial &Production Engineering
34
17
8/24/2023
Bangladesh University of Eng. & Tech. Slide 35 of 108 Industrial &Production Engineering
35
Bangladesh University of Eng. & Tech. Slide 36 of 108 Industrial &Production Engineering
36
18
8/24/2023
Bangladesh University of Eng. & Tech. Slide 37 of 108 Industrial &Production Engineering
37
Example 3
Bangladesh University of Eng. & Tech. Slide 38 of 108 Industrial &Production Engineering
38
19
8/24/2023
Example 3
Bangladesh University of Eng. & Tech. Slide 39 of 108 Industrial &Production Engineering
39
Example 4
Bangladesh University of Eng. & Tech. Slide 40 of 108 Industrial &Production Engineering
40
20
8/24/2023
Example 4
Bangladesh University of Eng. & Tech. Slide 41 of 108 Industrial &Production Engineering
41
Relationship to Confidence
Interval Estimation
• The hypothesis-testing approach to statistical inference in this
lecture is very closely related to the confidence interval approach in
studied in the previous lecture.
• Confidence interval estimation involves computation of bounds
within which it is “reasonable” for the parameter in question to lie.
• For the case of a single population mean μ with σ2 known, the
structure of both hypothesis testing and confidence interval
estimation is based on the random variable
Bangladesh University of Eng. & Tech. Slide 42 of 108 Industrial &Production Engineering
42
21
8/24/2023
Bangladesh University of Eng. & Tech. Slide 43 of 108 Industrial &Production Engineering
43
Example 5
Bangladesh University of Eng. & Tech. Slide 44 of 108 Industrial &Production Engineering
44
22
8/24/2023
Bangladesh University of Eng. & Tech. Slide 45 of 108 Industrial &Production Engineering
45
46
23
8/24/2023
47
• Here we are assuming that n1 and n2 are sufficiently large that the
Central Limit Theorem applies.
• Of course, if the two populations are normal, the statistic above has
a standard normal distribution even for small n1 and n2.
Bangladesh University of Eng. & Tech. Slide 48 of 108 Industrial &Production Engineering
48
24
8/24/2023
Bangladesh University of Eng. & Tech. Slide 49 of 108 Industrial &Production Engineering
49
<
Bangladesh University of Eng. & Tech. Slide 50 of 108 Industrial &Production Engineering
50
25
8/24/2023
Example 6
Bangladesh University of Eng. & Tech. Slide 51 of 108 Industrial &Production Engineering
51
Example 6
Bangladesh University of Eng. & Tech. Slide 52 of 108 Industrial &Production Engineering
52
26
8/24/2023
Paired Observations
• A study of the two-sample t-test or confidence interval on the
difference between means should suggest the need for experimental
design.
• Recall the discussion of experimental units in Lecture 1, where it
was suggested that the conditions of the two populations (often
referred to as the two treatments) should be assigned randomly to
the experimental units.
• This is done to avoid biased results due to systematic differences
between experimental units.
• In other words, in hypothesis- testing jargon, it is important that any
significant difference found between means be due to the different
conditions of the populations and not due to the experimental units
in the study.
Bangladesh University of Eng. & Tech. Slide 53 of 108 Industrial &Production Engineering
53
Paired Observations
• For example, consider Exercise 9.40 in Section 9.9.
Bangladesh University of Eng. & Tech. Slide 54 of 108 Industrial &Production Engineering
54
27
8/24/2023
Paired Observations
• For example, consider Exercise 9.40 in Section 9.9.
• The 20 seedlings play the role of the experimental units.
• Ten of them are to be treated with nitrogen and 10 with no nitrogen.
• It may be very important that this assignment to the “nitrogen” and
“no-nitrogen” treatments be random to ensure that systematic
differences between the seedlings do not interfere with a valid
comparison between the means.
• In Example 10.6, time of measurement is the most likely choice for
the experimental unit.
• The 22 pieces of material should be measured in random order.
• We need to guard against the possibility that wear measurements
made close together in time might tend to give similar results.
Bangladesh University of Eng. & Tech. Slide 55 of 108 Industrial &Production Engineering
55
Paired Observations
• Systematic (nonrandom) differences in experimental units are not
expected.
• However, random assignments guard against the problem.
• Testing of two means can be accomplished when data are in the
form of paired observations, as discussed in Lecture 1.
• In this pairing structure, the conditions of the two populations
(treatments) are assigned randomly within homogeneous units.
• Computation of the confidence interval for μ1 − μ2 in the situation
with paired observations is based on the random variable
56
28
8/24/2023
Paired Observations
• As in the case of the pooled t-test, the assumption is that the
observations from each population are normal.
• This two-sample problem is essentially reduced to a one-sample
problem by using the computed differences d1, d2, . . . , dn. Thus, the
hypothesis reduces to
Bangladesh University of Eng. & Tech. Slide 57 of 108 Industrial &Production Engineering
57
58
29
8/24/2023
Bangladesh University of Eng. & Tech. Slide 59 of 108 Industrial &Production Engineering
59
Bangladesh University of Eng. & Tech. Slide 60 of 108 Industrial &Production Engineering
60
30
8/24/2023
• The errors with expectation zero may tend to cause the response
values X1i and X2i to move in opposite directions, resulting in a
negative value for Cov(ε1i, ε2i) and hence negative Cov(X1i, X2i).
Bangladesh University of Eng. & Tech. Slide 61 of 108 Industrial &Production Engineering
61
62
31
8/24/2023
Bangladesh University of Eng. & Tech. Slide 63 of 108 Industrial &Production Engineering
63
Case Study
Bangladesh University of Eng. & Tech. Slide 64 of 108 Industrial &Production Engineering
64
32
8/24/2023
Case Study
Bangladesh University of Eng. & Tech. Slide 65 of 108 Industrial &Production Engineering
65
Case Study
Bangladesh University of Eng. & Tech. Slide 66 of 108 Industrial &Production Engineering
66
33
8/24/2023
Bangladesh University of Eng. & Tech. Slide 67 of 108 Industrial &Production Engineering
67
Bangladesh University of Eng. & Tech. Slide 68 of 108 Industrial &Production Engineering
68
34
8/24/2023
69
Bangladesh University of Eng. & Tech. Slide 70 of 108 Industrial &Production Engineering
70
35
8/24/2023
71
Bangladesh University of Eng. & Tech. Slide 72 of 108 Industrial &Production Engineering
72
36
8/24/2023
Bangladesh University of Eng. & Tech. Slide 73 of 108 Industrial &Production Engineering
73
Example 9
Bangladesh University of Eng. & Tech. Slide 74 of 108 Industrial &Production Engineering
74
37
8/24/2023
Bangladesh University of Eng. & Tech. Slide 75 of 108 Industrial &Production Engineering
75
Example 10
Bangladesh University of Eng. & Tech. Slide 76 of 108 Industrial &Production Engineering
76
38
8/24/2023
Bangladesh University of Eng. & Tech. Slide 77 of 108 Industrial &Production Engineering
77
Bangladesh University of Eng. & Tech. Slide 78 of 108 Industrial &Production Engineering
78
39
8/24/2023
Bangladesh University of Eng. & Tech. Slide 79 of 108 Industrial &Production Engineering
79
Bangladesh University of Eng. & Tech. Slide 80 of 108 Industrial &Production Engineering
80
40
8/24/2023
Example 11
Bangladesh University of Eng. & Tech. Slide 81 of 108 Industrial &Production Engineering
81
Example 11
Bangladesh University of Eng. & Tech. Slide 82 of 108 Industrial &Production Engineering
82
41
8/24/2023
Bangladesh University of Eng. & Tech. Slide 83 of 108 Industrial &Production Engineering
83
• where n is the sample size, s2 is the sample variance, and σ02 is the value of σ2 given
by the null hypothesis.
• If H0 is true, χ2 is a value of the chi-squared distribution with v = n − 1 degrees of
freedom.
• Critical regions:
Bangladesh University of Eng. & Tech. Slide 84 of 108 Industrial &Production Engineering
84
42
8/24/2023
Robustness of 𝜒2-Test to
Assumption of Normality
• We know that various tests depend, at least theoretically, on the assumption of
normality.
• In general, many procedures in applied statistics have theoretical underpinnings that
depend on the normal distribution.
• These procedures vary in the degree of their dependency on the assumption of
normality.
• A procedure that is reasonably insensitive to the assumption is called a robust
procedure (i.e., robust to normality).
• The χ2-test on a single variance is very nonrobust to normality (i.e., the practical
success of the procedure depends on normality).
• As a result, the P-value computed may be appreciably different from the actual P-
value if the population sampled is not normal.
• Indeed, it is quite feasible that a statistically significant P-value may not truly signal
H1: σ ≠ σ0; rather, a significant value may be a result of the violation of the normality
assumptions.
• Therefore, the analyst should approach the use of this particular χ2-test with caution.
Bangladesh University of Eng. & Tech. Slide 85 of 108 Industrial &Production Engineering
85
Example 12
Bangladesh University of Eng. & Tech. Slide 86 of 108 Industrial &Production Engineering
86
43
8/24/2023
• For independent random samples of sizes n1 and n2, respectively, from the
two populations, the f-value for testing σ12 = σ22 is the ratio
• where s12 and s22 are the variances computed from the two samples.
• If the two populations are approximately normally distributed and the null hypothesis
is true, according to Theorem 8.8 the ratio f = s12 / s22 is a value of the F-distribution
with v1 = n1 − 1 and v2 = n2 − 1 degrees of freedom.
• Critical regions:
Bangladesh University of Eng. & Tech. Slide 87 of 108 Industrial &Production Engineering
87
Example 13
Bangladesh University of Eng. & Tech. Slide 88 of 108 Industrial &Production Engineering
88
44
8/24/2023
Goodness-of-Fit Test
Bangladesh University of Eng. & Tech. Slide 89 of 108 Industrial &Production Engineering
89
Goodness-of-Fit Test
• Suppose that the die is tossed 120 times and each outcome is
recorded.
• Theoretically, if the die is balanced, we would expect each face to
occur 20 times.
Bangladesh University of Eng. & Tech. Slide 90 of 108 Industrial &Production Engineering
90
45
8/24/2023
Goodness-of-Fit Test
• It is common practice to refer to each possible outcome of an
experiment as a cell.
• In our illustration, we have 6 cells.
• The appropriate statistic on which we base our decision criterion for
an experiment involving k cells is defined by the following.
• A goodness-of-fit test between observed and expected frequencies
is based on the quantity
91
Goodness-of-Fit Test
• If the observed frequencies are close to the corresponding expected
frequencies, the 𝜒2 -value will be small, indicating a good fit.
• If the observed frequencies differ considerably from the expected
frequencies, the 𝜒2 -value will be large and the fit is poor.
• A good fit leads to the acceptance of H0, whereas a poor fit leads to
its rejection.
• The critical region will, therefore, fall in the right tail of the chi-
squared distribution.
• For a level of significance equal to α, we find the critical value 𝜒2α
from Table A.5, and then 𝜒2 > 𝜒2α constitutes the critical region.
• The decision criterion described here should not be used unless
each of the expected frequencies is at least equal to 5.
• This restriction may require the combining of adjacent cells, resulting
in a reduction in the number of degrees of freedom.
Bangladesh University of Eng. & Tech. Slide 92 of 108 Industrial &Production Engineering
92
46
8/24/2023
Bangladesh University of Eng. & Tech. Slide 93 of 108 Industrial &Production Engineering
93
Bangladesh University of Eng. & Tech. Slide 94 of 108 Industrial &Production Engineering
94
47
8/24/2023
Goodness-of-Fit Test
• Since 1.7 is less than the critical value, we fail to reject H0.
• We conclude that there is insufficient evidence that the die is not
balanced.
Bangladesh University of Eng. & Tech. Slide 95 of 108 Industrial &Production Engineering
95
Goodness-of-Fit Test
Bangladesh University of Eng. & Tech. Slide 96 of 108 Industrial &Production Engineering
96
48
8/24/2023
Goodness-of-Fit Test
97
Bangladesh University of Eng. & Tech. Slide 98 of 108 Industrial &Production Engineering
98
49
8/24/2023
Bangladesh University of Eng. & Tech. Slide 99 of 108 Industrial &Production Engineering
99
Bangladesh University of Eng. & Tech. Slide 100 of 108 Industrial &Production Engineering
100
50
8/24/2023
Bangladesh University of Eng. & Tech. Slide 101 of 108 Industrial &Production Engineering
101
Bangladesh University of Eng. & Tech. Slide 102 of 108 Industrial &Production Engineering
102
51
8/24/2023
Bangladesh University of Eng. & Tech. Slide 103 of 108 Industrial &Production Engineering
103
Bangladesh University of Eng. & Tech. Slide 104 of 108 Industrial &Production Engineering
104
52
8/24/2023
Example 14
Bangladesh University of Eng. & Tech. Slide 105 of 108 Industrial &Production Engineering
105
Example 14
Bangladesh University of Eng. & Tech. Slide 106 of 108 Industrial &Production Engineering
106
53
8/24/2023
Example 14
Bangladesh University of Eng. & Tech. Slide 107 of 108 Industrial &Production Engineering
107
Assignment-2
Bangladesh University of Eng. & Tech. Slide 108 of 108 Industrial &Production Engineering
108
54