Chapter 7 L1
Chapter 7 L1
Hypothesis Testing
- Two Populations
Week 10
L 1: Hyp Testing – mean ( 2 populations, variance known)
September 2013
Learning Objectives
September 2013
Comparing Two Population Means
y1 , y 2 ,...., y n Population B
If mA = mB Population A = Population B
( probability distributions are equal)
If m A m B probability distributions are different
Comparing Two Population Means
Normal distribution,
Normal distribution, Unknown variances,
Known variances,
Case 1: 12 22 Case 2: 12 22
September 2013
TEST ABOUT TWO NORMAL MEANS
WHEN TWO VARIANCES ARE KNOWN
Assumptions:
September 2013
TEST ABOUT TWO NORMAL MEANS
WHEN TWO VARIANCES ARE KNOWN
Test about the difference
Null Hypothesis:
H 0 : m1 m 2 vs H1 : m1 m2 , or H1 : m1 m2 or H1 : m1 m2
( x1 x2 ) ( m1 m 2 )
Z ~ N (0,1) if m1 m 2
Test statistic:
( 12 / n1 ) ( 22 / n2 )
H1 : m1 m 2 Z z / 2 or Z z / 2
H1 : m1 m 2 Z z
H1 : m1 m 2 Z z
A 100(1 )% confidence interval for m1 m2 is
2 2 2
2
x1 x2 z / 2 1
m1 m 2 x1 x2 z / 2
2 1
2
n1 n2 n1 n2
September 2013
Example 1:
A random sample of size n = 25 taken from a normal population
with = 5.2 has a mean equals 81. A second random sample of
size n = 36, taken from a different normal population with = 3.4,
has a mean equals 76. Do the data indicate that the true mean
value m1 and m2 are different? Carry out a test at = 0.01
Solution
1. From the problem context, identify the parameter of interest
Parameter of interest; the difference between the true average m1 m 2
September 2013
3. Determine the appropriate test statistic
( x1 x2 ) ( m1 m 2 )
Z
( 12 / n1 ) ( 22 / n2 )
7. Make a decision
12 22 12 22
( x1 x2 ) z / 2 (m1 m 2 ) ( x1 x2 ) z / 2
n1 n2 n1 n2
( x1 x2 ) ( m1 m 2 )
Z
( 12 / n1 ) ( 22 / n2 )
September 2013
6. Compute any necessary sample quantities, substitute these into
the equation for the test statistic, and compute the value
From formula:
12 22 12 22
( x1 x2 ) z / 2 (m1 m 2 ) ( x1 x2 ) z / 2
n1 n2 n1 n2
7.589 m1 m2 4.141
H 0 : m1 m 2 vs H1 : m1 m2 , or H1 : m1 m2 or H1 : m1 m2
Test statistic:
( x1 x 2 ) ( m1 m 2 )
T
1 1
Sp
n1 n2
pooled estimator of 2 ( n 1) S 2
( n 1) S 2
S p2 1 1 2 2
n1 n2 2
TEST ABOUT TWO NORMAL MEANS WHEN TWO
VARIANCES ARE UNKNOWN
Test about the difference m1 m 2 0
Case 1: 12 22
Critical region:
H1 : m1 m 2 T t / 2, n1 n2 2 or T t / 2, n1 n2 2
H1 : m1 m 2 T t , n1 n2 2
H1 : m1 m 2 T t , n1 n2 2
September 2013
Confidence interval:
1 1
x1 x 2 t / 2,n1 n2 2 S p m1 m 2
n1 n 2
1 1
x1 x 2 t / 2,n1 n2 2 S p
n1 n 2
September 2013
Example 3:
Professor Adam taught the same large lecture course for two terms.
Except for negligible differences the courses were the same. However,
one met at 8am and the other met at 11am. The two courses were given
final exams of the same degree of difficulty and covering the same
material. Both exams were worth 100 points. A random sample of 16
students from the 8am class had an average score 73.2 with standard
deviation 8.1. A random sample of 16 students from the 11am class had
an average score of 78.1 with standard deviation 10. Assume that the
populations variance are the same and the data are drawn from a normal
distribution.
i. Do these data indicate that the mean score for the 11am class is
higher than mean score for the 8am class?. Use a=0.05.
ii. What is the P-value for this test? What is your conclusion?
H 0 : m1 m 2 H1 : m1 m2
3. Determine the appropriate test statistic
( x1 x 2 ) ( m1 m 2 )
T
1 1
Sp
n1 n2
September 2013
4. Critical value given = 0.05 t , n1 n2 2 t0.05,30 1.697
Re ject H0 if T 1.697
( x1 x 2 ) ( m1 m 2 )
T
1 1
Sp
n1 n2
September 2014
X1 73.2, X 2 78.1, s1 8.1, s2 10.0, n1 16, n2 16
Compute the value of the test statistic:
7. Make a decision
September 2014
Find the p - value
From t-table with 30 df, T =1.52 is between t= 1.310 and
t=1.697, which give 0.05<p<0.1.
September 2014
Find a 95% CI on the difference in means where t0.025,30 =2.042 is
September 2014
Exercise:
The diameter of steel rods manufactured on two different extrusion
machines is being investigated. Two random samples of sizes n1 = 15
and n2 = 17 are selected, and x1 8.37, s1 0.35 and x2 8.68, s2 0.40
2 2
a) Is there evidence to support the claim that the two machines produce
rods with different mean diameters ? Use the p – value approach.
September 2014
Solution
1. From the problem context, identify the parameter of interest
Parameter of interest; the difference between the true average m1 m 2
( x1 x 2 ) ( m1 m 2 )
T
1 1
Sp
n1 n2
September 2014
6. Compute any necessary sample quantities, substitute these into
the equation for the test statistic, and compute the value
( n1 1)s12 ( n2 1)s22 14(0.35) 16(0.40)
sp 0.614
n1 n2 2 30
(8.73 8.68) 0
T 0.230
1 1
0.614
15 17
Find the p - value
1 1 1 1
t / 2,n1 n2 2 ( s p ) 2.042(0.614)
n1 n2 15 17
September 2014