Engineering Data Analysis M9 Finals
Engineering Data Analysis M9 Finals
Module No. 9
II. Topic: 9.1. Inference on the Difference in Means of Two Normal Distributions,
Variances Known
9.2. Inference on the Difference in Means of Two Normal Distribution,
Variances Unknown
9.3. Inference on the Variance of Two Normal Distributions
9.4. Inference on Two Population Proportions
IV. Introduction:
V. Objectives:
1
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
The previous module presented hypothesis tests and confidence intervals for a
single population parameter (the mean μ, the variance 𝜎 2 , or a proportion 𝜌). This
chapter extends those results to the case of two independent populations.
The general situation is shown in Figure 9.1. Population 1 has mean 𝜇1 and
variance 𝜎12 , and population 2 has mean 𝜇2 and variance 𝜎22 . Inferences will be
based on two random samples of sizes 𝑛1 and 𝑛2 , respectively. That is, 𝑋11,
𝑋12,..., 𝑋1𝑛1 is a random sample of 𝑛1 observations from population 1, and 𝑋21 ,
𝑋22 ,..., 𝑋2𝑛2 is a random sample of 𝑛2 observations from population 2. Most of the
practical applications of the procedures in this chapter arise in the context of
simple comparative experiments in which the objective is to study the difference
in the parameters of the two populations.
2
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝜎12 𝜎22
𝑉(𝑋1 − 𝑋2 ) = 𝑉(𝑋1 ) − 𝑉(𝑋2 ) = +
𝑛1 𝑛2
Based on the assumptions and the preceding results, we may state the following.
3
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
4
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
When the population variances are unknown, the sample variances 𝑠12 and 𝑠22 can
be substituted into the test statistic Equation 9.2 to produce a large-sample test for
the difference in means. This procedure will also work well when the populations
are not necessarily normally distributed. However, both 𝑛1 and 𝑛2 should exceed
40 for this large-sample test to be valid
5
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
|𝜇1 − 𝜇2 − ∆0 | |∆ − ∆ 0 |
𝑑= =
√𝜎12 + 𝜎22 √𝜎12 + 𝜎22
and one must choose equal sample sizes, say, n=n1=n2. The one-sided
alternative hypotheses require the use of Charts VII𝑐 and VII𝑑. For the one-
sided alternatives 𝐻1 : 𝜇1 − 𝜇2 > ∆0 or 𝐻1 : 𝜇1 − 𝜇2 < ∆0 , the abscissa scale is
also given by
|𝜇1 − 𝜇2 − ∆0 | |∆ − ∆ 0 |
𝑑= =
√𝜎12 + 𝜎22 √𝜎12 + 𝜎22
It is not unusual to encounter problems where the costs of collecting data differ
substantially for the two populations or when the variance for one population is
much greater than the other. In those cases, we often use unequal sample
sizes. If 𝑛1 ≠ 𝑛2 , the operating characteristic curves may be entered with an
equivalent value of n computed from
𝜎12 + 𝜎22
𝑛= 2
𝜎1 ⁄𝑛1 + 𝜎22 ⁄𝑛2
If 𝑛1 ≠ 𝑛2 and their values are fixed in advance, Equation 9.4 is used directly to
calculate 𝑛, and the operating characteristic curves are entered with a specified
𝑑 to obtain β. If we are given d and it is necessary to determine 𝑛1 and 𝑛2 to
obtain a specified β, say, β*, we guess at trial values of 𝑛1 and 𝑛2 , calculate 𝑛
in Equation 9.4, and enter the curves with the specified value of d to find β.If
β=β*, the trial values of 𝑛1 and 𝑛2 are satisfactory. If β ≠ β*, adjustments to 𝑛1
and 𝑛2 are made and the process is repeated.
6
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Sample Size Formulas. It is also possible to obtain formulas for calculating the
sample sizes directly. Suppose that the null hypothesis 𝐻𝑜 : 𝜇1 − 𝜇2 = ∆0 is false and
that the true difference in means is 𝜇1 − 𝜇2 where ∆> ∆0. One may find formulas for
the sample size required to obtain a specific value of the type II error probability β for
a given difference in means Δ and level of significance α For example, we first write
the expression for theβ-error for the two-sided alternative, which is
∆ − ∆0 ∆ − ∆0
𝛽 = Φ 𝑍𝑎⁄2 − − Φ −𝑍𝑎⁄2 −
𝜎12 𝜎22 𝜎12 𝜎22
√ √
𝑛1 + 𝑛2 𝑛1 + 𝑛2
( ) ( )
The derivation for sample size closely follows the single-sample case in previous
module.
7
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝑋1 − 𝑋2 − (𝜇1 − 𝜇2 )
𝑍=
𝜎12 𝜎22
√
𝑛1 + 𝑛2
8
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝑋1 − 𝑋2 − (𝜇1 − 𝜇2 )
𝑃 −𝑧𝑎⁄2 ≤ ≤ 𝑧𝑎⁄2 = 1 − 𝑎
𝜎2 𝜎22
√ 1
𝑛1 + 𝑛2
[ ]
The confidence level 1−α is exact when the populations are normal. For non-normal
populations, the confidence level is approximately valid for large sample sizes.
Equation 9.7 can also be used as a large sample CI on the difference in mean when
𝜎12 and 𝜎22 are unknown by substituting 𝑠12 and 𝑠22 for the population variances. For this
to be a valid procedure, both sample sizes 𝑛1 and 𝑛2 should exceed 40.
9
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Choice of Sample Size If the standard deviations 𝜎1 and 𝜎2 are known (at least
approximately) and the two sample sizes 𝑛1 and 𝑛2 are equal (𝑛1 = 𝑛2 = 𝑛, 𝑠𝑎𝑦),
we can determine the sample size required so that the error in estimating 𝜇1 − 𝜇2
by 𝑥1 − 𝑥2 will be less than E at 100(1 − 𝑎)% confidence. The required sample size
from each population is
We now extend the results of the previous section to the difference in means
of the two distributions in Figure 9.1 when the variances of both distributions
𝜎12 and 𝜎22 are unknown. If the sample sizes 𝑛1 and 𝑛2 exceed 40, the normal
distribution procedures in Section 9.1 could be used. However, when small
samples are taken, we assume that the populations are normally distributed
and base our hypotheses tests and confidence intervals on the t distribution.
This parallels nicely the case of inference on the mean of a single sample
with unknown variance
10
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝐻0 : 𝜇1 − 𝜇2 = ∆0
𝐻1 : 𝜇1 − 𝜇2 ≠ ∆0
𝜎2 𝜎2 1 1
𝑉(𝑋1 − 𝑋2 ) = + = 𝜎2 ( + )
𝑛1 𝑛2 𝑛1 𝑛2
It seems reasonable to combine the two sample variances 𝑆12 and 𝑆22 to form
an estimator of 𝜎 2 .The pooled estimator of 𝜎 2 is defined as follows.
11
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝑛1 − 1 𝑛2 − 1
𝑆𝑝2 = 𝑆12 + 𝑆 2 = 𝑤𝑆12 + (1 − 𝑤)𝑆22
𝑛1 + 𝑛2 − 2 𝑛1 + 𝑛2 − 2 2
where 0 < 𝑤 ≤ 1. Thus, 𝑆𝑝2 is a weighted average of the two sample variances
𝑆12 and 𝑆22 where the weights wand 1 − 𝑤 depend on the two sample sizes 𝑛1
and 𝑛2 . Obviously, if 𝑛1 = 𝑛2 = 𝑛, 𝑤 = 0.5, 𝑆𝑝2 is just the arithmetic average of
𝑆12 and 𝑆22 If 𝑛1 = 10 and 𝑛2 = 20 (say), 𝑤 = 0.32 and 1 − 𝑤 = 0.68. The first
sample contributes 𝑛1 − 1 degrees of freedom to 𝑆𝑝2 and the second sample
contributes 𝑛2 − 1 degrees of freedom. Therefore, 𝑆𝑝2 has 𝑛1 + 𝑛2 − 2 degrees
of freedom. Now we know that
𝑋1 − 𝑋2 − (𝜇1 − 𝜇2 )
𝑍=
1 1
𝜎√ +
𝑛1 𝑛2
The use of this information to test the hypotheses in Equation 9.11 is now
straight forward: Simply replace 𝜇1 − 𝜇2 by ∆0, and the resulting test statistic
has at distribution with 𝑛1 + 𝑛2 − 2 degrees of freedom under 𝐻0 : 𝜇1 − 𝜇2 = ∆0 .
Therefore, the reference distribution for the test statistic is the t distribution with
𝑛1 + 𝑛2 − 2 degrees of freedom. The calculation of P-values and the location of
the critical region for fixed-significance-level testing for both two- and one-sided
alternatives parallels those in the one-sample case. Because a pooled estimate
of variance is used, the procedure is often called the pooled t-test.
12
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Normal probability plot and comparative box plot for the catalyst-yield data in
Example 9.5 (a) Normal Probability plot. (b) Box plots.
13
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
14
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
15
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
|∆ − ∆ 0 |
𝑑=
2𝜎
Where Δ is the true difference in means that is of interest. To use these curves,
they must be entered with the sample size 𝑛∗ = 2𝑛 − 1. For the one-sided
alternative hypothesis, we use Charts VII𝑔 and VI𝐼ℎ and defined and Δ as in
Equation 9.17. It is noted that the parameter d is a function of 𝜎, which is
unknown. As in the single-sample 𝑡 − test we may have to rely on a prior
estimate of 𝜎 or use a subjective estimate. Alternatively, we could define the
differences in the mean that we wish to detect relative to 𝜎.
𝑋1 − 𝑋2 − (𝜇1 − 𝜇2 )
𝑇=
1 1
𝑆𝑝 √𝑛 + 𝑛
1 2
16
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
In many situations, assuming that 𝜎12 = 𝜎22 is not reasonable. When this
assumption is unwarranted, we may still find a 100(1 − 𝑎)% confidence
interval on 𝜇1 − 𝜇2 using the fact that 𝑇∗ =
[𝑋1 − 𝑋2 − (𝜇1 − 𝜇2 )]⁄√𝑆12 ⁄𝑛1 + 𝑆22 ⁄𝑛2 is distributed approximately as t with
degrees of freedom v given by Equation 9.16. The CI expression follows.
17
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Let 𝑋11 , 𝑋12,…., 𝑋1𝑛1 and 𝑋21 , 𝑋22 ,…., 𝑋2𝑛2 be two independent random
samples of sizes 𝑛1 ≤ 𝑛2 from the continuous populations 𝑋1 and 𝑋2 described
earlier. We wish to test the hypotheses
𝐻0 : 𝜇1 = 𝜇2 𝐻1 : 𝜇1 ≠ 𝜇2
(𝑛1 + 𝑛2 )(𝑛1 + 𝑛2 + 1)
𝑊2 = − 𝑊1
2
Now if the sample means do not differ, we expect the sum of the ranks to be
nearly equal for both samples after adjusting for the difference in sample size.
Consequently, if the sums of the ranks differ greatly, we conclude that the
means are not equal.
18
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Appendix Table X contains the critical value of the rank sums for 𝑎 = 0.05 and
𝑎 = 0.01 assuming the preceding two-sided alternative. Refer to Appendix
Table X with the appropriate sample sizes n1andn2, and the critical value 𝑤𝑎
can be obtained. The null 𝐻0 : 𝜇1 = 𝜇2 is rejected in favor of 𝐻1 : 𝜇1 < 𝜇2 , if either
of the observed values 𝑤1 or 𝑤2 is less than or equal to the tabulated critical
value 𝑤𝑎 .
The procedure can also be used for one-sided alternatives. If the alternative
is 𝐻1 : 𝜇1 < 𝜇2 , reject 𝐻0 if 𝑤1 ≤ 𝑤𝑎 ; for 𝐻1 : 𝜇1 > 𝜇2 , reject 𝐻𝑜 if 𝑤2 ≤ 𝑤𝑎 . For
these one-sided tests, the tabulated critical values 𝑤𝑎 correspond to levels of
significance of 𝑎 = 0.025 and 𝑎 = 0.005.
19
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
When both 𝑛1 and 𝑛2 are moderately large, say, more than eight, the
distribution of 𝑤1 can be well approximated by the normal distribution with
mean
𝑛1 (𝑛1 + 𝑛2 + 1)
𝜇𝑤1 =
2
and variance
𝑛1 𝑛2 (𝑛1 + 𝑛2 + 1)
𝜎𝑤2 1 =
12
𝑊1 − 𝜇𝑤1
𝑍0 =
𝜎𝑤1
as a statistic, and the appropriate critical region is |𝑧0 | > 𝑍𝑎⁄2, 𝑧0 > 𝑧𝑎 , or 𝑧0 <
−𝑧𝑎 , depending on whether the test is a two-tailed, upper-tailed, or lower-tailed
test.
20
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
A special case of the two-sample t-tests in Section 9.2 occurs when the
observations on the two populations of interest are collected in pairs. Each
pair of observations, say (𝑋1𝑗 , 𝑋2𝑗 ), is taken under homogeneous conditions,
but these conditions may change from one pair to another. For example,
suppose that we are interested in comparing two different types of tips for a
hardness-testing machine. This machine presses the tip into a metal specimen
with a known force. By measuring the depth of the depression caused by the
tip, the hardness of the specimen can be determined. If several specimens
were selected at random, half tested with tip 1, half tested with tip 2, and the
pooled or independent t - test in Section 9.2 was applied, the results of the
test could be erroneous. The metal specimens could have been cut from bar
stock that was produced in different heats, or they might not be homogeneous
in some other way that might affect hardness. Then the observed difference
in mean hardness readings for the two tip types also includes hardness
differences in specimens.
Let (𝑋11 , 𝑋21 ),(𝑋12 , 𝑋22 ),...,(𝑋1𝑛 , 𝑋2𝑛 ) be a set of 𝑛 paired observations for
which we assume that the mean and variance of the population represented
by 𝑋1 are 𝜇1 and 𝜎12 and the mean and variance of the population represented
by 𝑋2 are 𝜇2 and 𝜎22 . Define the difference for each pair of observations as
𝐷𝑗 = 𝑋1𝑗 − 𝑋2𝑗 , 𝑗 = 1,2, … , 𝑛.The 𝐷𝑗 ′𝑠 are assumed to be normally distributed
with mean
and variance 𝜎𝐷2 so testing hypotheses about the difference for 𝜇1 and 𝜇2 can
be accomplished by performing a one sample t - test on 𝜇𝐷 . Specifically,
testing 𝐻1 : 𝜇1 − 𝜇2 = ∆0 against 𝐻1 : 𝜇1 − 𝜇2 ≠ ∆0 is equivalent to testing
𝐻0 : 𝜇𝐷 = ∆0
𝐻1 : 𝜇𝐷 ≠ ∆0
21
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
The results essentially agree with the manual calculations, in addition to the
hypothesis test results. Most computer software report a two-sided CI on the
difference in means. This CI was found by constructing a single-sample CI on 𝜇𝐷 .
We provide the details later.
22
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝑋1 − 𝑋 2 − ∆0
𝑇0 =
1 1
𝑆𝑝 √𝑛 + 𝑛
𝐷 − ∆0
𝑇0 =
𝑆𝑝 ⁄√𝑛
the numerators of both statistics are identical. However, the denominator of the
two-sample t - test is based on the assumption that 𝑋1 and 𝑋2 are independent.
In many paired experiments, a strong positive correlation ρ exists for 𝑋1 and 𝑋2 .
Then it can be shown that
23
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Implementing the rules still requires judgment because σ and ρ are never known
precisely. Furthermore, if the number of degrees of freedom is large (say, 40 or
50), the loss of n−1 of them for pairing may not be serious. However, if the
number of degrees of freedom is small (say, 10 or 20), losing half of them is
potentially serious if not compensated for by increased precision from pairing.
𝐷 − 𝜇𝐷
𝑇=
𝑆𝐷 ⁄√𝑛
This confidence interval is also valid for the case in which 𝜎12 ≠ 𝜎22 because 𝑠𝐷2
estimates 𝜎𝐷2 = 𝑉(𝑋1 − 𝑋2 ) Also, for large samples (say, 𝑛 ≥ 30 pairs), the
explicit assumption of normality is unnecessary because of the central limit
theorem.
24
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Nonparametric Approach to Paired Comparisons: Both the sign test and the
Wilcoxon signed-rank test discussed in Module 8 can be applied to paired
observations. In the case of the sign test, the null hypothesis is that the median
of the differences is equal to zero (that is, 𝐻0 : 𝑢̃𝐷 = 0 ). The Wilcoxon signed-rank
test is for the null hypothesis that the mean of the differences is equal to zero.
The procedures are applied to the observed differences as described in Module
8
We now introduce tests and confidence intervals for the two population variances
shown in Figure 9.1. We assume that both populations are normal. Both the
hypothesis testing and confidence interval procedures are relatively sensitive to
the normality assumption.
9.3.1 𝑭 Distribution
Suppose that two independent normal populations are of interest when the
population means and variances, say, 𝜇1 , 𝜎12 , 𝜇2 and 𝜎22 are unknown. We
wish to test hypotheses about the equality of the two variances, say, 𝐻0 : 𝜎12 =
𝜎22 . Assume that two random samples of size 𝑛1 from population 1 and of
size 𝑛2 from population 2 are available, and let 𝑆12 and 𝑆22 be the sample
variances. We wish to test the hypotheses
25
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝐻0 : 𝜎12 = 𝜎22
𝐻1 : 𝜎12 ≠ 𝜎22
𝑊 ⁄𝜇
𝐹=
𝑌 ⁄𝜈
The mean and variance of the F distribution are 𝜇 = 𝜈⁄(𝜈 − 2) for 𝜈 > 2 and
2𝜈 2 (𝜇 + 𝜈 − 2)
𝜎2 = ,
𝜇(𝜈 − 2)2 (𝜈 − 4)
Two F distributions are shown in Figure 9.4. The F random variable is nonnegative,
and the distribution is skewed to the right. The F distribution looks very similar to
the chi-square distribution; however, the two parameters 𝜇 and 𝜐 provide extra
flexibility regarding shape.
26
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
∞
𝑃(𝐹 > 𝑓𝑎,𝑢𝑣 ) = ∫ 𝑓 (𝑥 )𝑑𝑥 = 𝑎
𝑓𝑎,𝑢𝑣
This is illustrated in Figure 9.5. For example, if 𝜇 = 5 and 𝜐 = 10, we find from
Table V of the Appendix that
Table VI contains only upper-tailed percentage points (for selected values of 𝑓𝑎,𝑢,𝜈
for 𝑎 ≤ 0.25) of the F distribution. The lower-tailed percentage points 𝑓1−𝑎,𝑢,𝜈 can
be found as follows.
For example, to find the lower-tailed percentage point 𝑓0.9,5,10, note that
1 1
𝑓0.9,5,10 = = = 0.211
𝑓0.05,510 4.74
27
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
This result is based on the fact that (𝑛1 − 1)𝑆12 ⁄𝜎12 is a chi-square random variable
with 𝑛2 − 1 degrees of freedom, that (𝑛2 − 1)𝑆22 ⁄𝜎22 is a chi-square random
variable with 𝑛2 − 1 degrees of freedom, and that the two normal populations are
independent. Clearly, under the null hypothesis 𝐻0 : 𝜎12 = 𝜎22 , the ratio 𝐹0 = 𝑆12 ⁄𝑆22
has an 𝐹𝑛1 −1,𝑛2 −1 distribution. This is the basis of the following test procedure.
The critical regions for these fixed-significance-level tests are shown in Figure 9.6.
Remember that this procedure is relatively sensitive to the normality assumption.
28
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
The P - value approach can also be used with F - tests. To show how to do this,
consider the upper-tailed test. The P - value is the area (probability) under the F
distribution with 𝑛1 − 1 and 𝑛2 − 1 degrees of freedom that lies beyond the computed
value of the test statistic 𝑓0. Appendix A Table IV can be used to obtain upper and
lower bounds on the P - value. For example, consider an F - test with 9 numerator and
14 denominator degrees of freedom for which 𝑓0 = 3.05. From Appendix A Table IV,
we find that 𝑓0.05,9.14 = 2.65 and 𝑓0.025,9.14 = 3.21 so because 𝑓0 = 3.05 lies between
these two values, the P - value is between 0.05 and 0.025; that is, 0.025 < P < 0.05.
The P - value for a lower-tailed test would be found similarly, although Appendix A
Table IV contains only upper-tailed points of the F distribution, Equation 9.31 would
have to be used to find the necessary lower-tail points. For a two-tailed test, the
bounds obtained from a one-tailed test would be doubled to obtain the P - value.
29
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Appendix Charts VII𝑜, VII𝑝, VII𝑞, and VII𝑟 provide operating characteristic curves
for the F - test given in Section 9.5.1 for 𝑎 = 0.05 and 𝑎 = 0.01, assuming that
𝑛1 = 𝑛2 = 𝑛. Charts VII𝑜 and VII𝑝 are used with the two-sided alternate
hypothesis. They plot β against the abscissa parameter
𝜎1
𝜆=
𝜎2
for various 𝑛1 = 𝑛2 = 𝑛. Charts VII𝑞 and VII𝑟 are used for the one-sided alternative
hypotheses.
To find the confidence interval on 𝜎12 ⁄𝜎22 , recall that the sampling distribution of
𝑆22 ⁄𝜎22
𝐹= 2 2
𝑆1 ⁄𝜎1
30
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
We now consider the case with two binomial parameters of interest, say, 𝑝1 and 𝑝2 ,
and we wish to draw inferences about these proportions. We present large-sample
hypothesis testing and confidence interval procedures based on the normal
approximation to the binomial.
Suppose that two independent random samples of sizes n1 and n2 are taken
from two populations, and let 𝑋1 and 𝑋2 represent the number of observations
that belong to the class of interest in samples 1 and 2, respectively.
Furthermore, suppose that the normal approximation to the binomial is
applied to each population, so the estimators of the population proportions
𝑃1 = 𝑋1 ⁄𝑛1 and 𝑃2 = 𝑋2 ⁄𝑛2 have approximate normal distributions. We are
interested in testing the hypotheses
𝐻0 : 𝑝1 = 𝑝2 𝐻1 : 𝑝1 ≠ 𝑝2
The statistics
31
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝑃̂1 − 𝑃̂2
𝑍=
1 1
√𝑝(1 − 𝑝) (
𝑛1 + 𝑛2 )
𝑋1 + 𝑋2
𝑃̂ =
𝑛1 + 𝑛2
𝑃̂1 − 𝑃̂2
𝑍𝑜 =
1 1
√𝑃̂(1 − 𝑃̂) ( + )
𝑛1 𝑛2
32
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
𝑝1 (1 − 𝑝1 ) 𝑝2 (1 − 𝑝2 )
𝜎𝑃̂1 −𝑃̂2 = √ +
𝑛1 𝑛2
33
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
34
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
The CI in Equation 9.41 is the traditional alone usually given for a difference in
two binomial proportions. However, the actual confidence level for this interval can
deviate substantially from the nominal or advertised value. So when we want a
95% CI (for example) and use 𝑧0.025 = 1.96 in Equation 9.41, the actual confidence
level that we experience may differ from 95%. This situation can be improved by
a very simple adjustment to the procedure: Add one success and one failure to
the data from each sample and then calculate:
35
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
VIII. Self-Evaluation:
a. Let 𝑋 be the sample average lifetime of 100 Duracell batteries and 𝑌 be the
sample average lifetime of 100 Eveready batteries. What is the mean value
of 𝑋 − 𝑌 (i.e., where is the distribution of 𝑋 − 𝑌 centered)? How does your
answer depend on the specified sample sizes?
b. Suppose the population standard deviations of lifetime are 1.8 hours for
Duracell batteries and 2.0 hours for Eveready batteries. With the sample
sizes given in part (a), what is the variance of the statistic 𝑋 − 𝑌, and what
is its standard deviation?
c. For the sample sizes given in part (a), draw a picture of the approximate
distribution curve of 𝑋 − 𝑌 (include a measurement scale on the horizontal
axis). Would the shape of the curve necessarily be the same for sample
sizes of 10 batteries of each type? Explain.
2. Determine the number of degrees of freedom for the two sample 𝑡 test or CI in
each of the following situations:
36
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
Summary table and road map for Inference procedures for two samples. The table
in the module summarizes all of the two-sample parametric inference procedures
given in this module. The table contains the null hypothesis statements, the test
statistics, the criteria for rejection of the various alternative hypotheses, and the
formulas for constructing the 100(1 − 𝑎)% confidence intervals. The road map to
select the appropriate parametric confidence interval formula or hypothesis test
method for one-sample problems was presented in previous module. In Table 9.5,
we extend the roadmap to two-sample problems. The primary comments stated
previously also apply here (except that we usually apply conclusions to a function
of the parameters from each sample, such as the difference in means):
1. Determine the function of the parameters (and the distribution of the data) that
is to be bounded by the confidence interval or tested by the hypothesis.
XI. References:
37
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
PRE-TEST 9
Statistical Inference of Two Samples
Name: Score:
Course & Year: Date:
Direction: Read the problems carefully. Write your solutions in a separate sheet of
paper.
2. Tensile-strength tests were carried out on two different grades of wire rod
(“Fluidized Bed Patenting of Wire Rods,” Wire J.,June 1977: 56–61), resulting
in the accompanying data.
a. Does the data provide compelling evidence for concluding that true average
strength for the 1078 grade exceeds that for the 1064 grade by more than
10 𝑘𝑔⁄𝑚𝑚2 ? Test the appropriate hypotheses using the 𝑃 − 𝑣𝑎𝑙𝑢𝑒
approach.
b. Estimate the difference between true average strengths for the two grades
in a way that provides information about precision and reliability.
38
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9
LEARNING MODULE SURIGAO STATE COLLEGE OF TECHNOLOGY
POST-TEST 9
Statistical Inference of Two Samples
Name: Score:
Course & Year: Date:
Direction: Read the problems carefully. Write your solutions in a separate sheet of
paper.
2. The slant shear test is widely accepted for evaluating the bond of resinous
repair materials to concrete; it utilizes cylinder specimens made of two identical
halves bonded at 30°. The article “Testing the Bond between Repair Materials
and Concrete Substrate” (ACI Materials J., 1996: 553–558) reported that for 12
specimens prepared using wire-brushing, the sample mean shear strength
(𝑁⁄𝑚𝑚2 ) and sample standard deviation were 19.20 and 1.58, respectively,
whereas for 12 hand-chiseled specimens, the corresponding values were 23.13
and 4.01. Does the true average strength appear to be different for the two
methods of surface preparation? State and test the relevant hypotheses using
a significance level of .05. What are you assuming about the shear strength
distributions?
3. It has been estimated that between 1945 and 1971, as many as 2 million
children were born to mothers treated with diethylstilbestrol (DES), a
nonsteroidal estrogen recommended for pregnancy maintenance. The FDA
banned this drug in 1971 because research indicated a link with the incidence
of cervical cancer. The article “Effects of Prenatal Exposure to Diethylstilbestrol
(DES) on Hemispheric Laterality and Spatial Ability in Human Males”
(Hormones and Behavior, 1992: 62–75) discussed a study in which 10 males
exposed to DES, and their unexposed brothers, underwent various tests. This
is the summary data on the results of a spatial ability test: 𝑥 = 12.6 (exposed)
𝑦 = 13.7, and standard error of mean difference = 0.50. Test at level .05 to see
whether exposure is associated with reduced spatial ability by obtaining the 𝑃 −
𝑣𝑎𝑙𝑢𝑒.
39
MATH 114 – ENGINEERING DATA ANALYSIS
MODULE 9