Beruflich Dokumente
Kultur Dokumente
Introduction
Twogroups of people, male and female. We want to
compare their average weekly spending.
Two airline companies flying the same routes. We want to
compare their average delay time.
We want to see if a training program is successful by
comparing the test scores before and after the program.
We want to compare the height between husbands and
wives
STA 1502: TUTORIALS ON DIFFERENCE
BETWEEN 2 MEANS
If X 1 N 1 , 1 and X 2 N 2 , 2
And X 1 and X 2 are independent.
12 22
Then ( x1 x2 ) N (1 2 ),
n1 n2
12 22
( x1 x2 ) N (1 2 ),
n1 n2
12 22
Confidence interval for 1 2 is ( x1 x2 ) Z 2
n1 n2
( x1 x2 ) (1 2 )
The test statistic is z
12 22
n1 n2
Example:
Periodically, coupons that can be used to purchase products at discount prices
appear in local newspapers. A supermarket chain has two different types of
coupon for its own brand of bread. Coupon 1 offers two loaves for the price of
one, and coupon 2 offers a 25 cent discount on the purchase of each loaf. In
order to determine the relative selling power of the two plans, the supermarket
chain performs the following experiment. The coupons appear in four
consecutive weeks (coupon 1 in weeks 1 and 2, and coupon 2 in weeks 3 and 4)
in local newspaper. The company wants to estimate the average daily sales
under each coupon plan. The average number of loaves sold per day during the
first 14 days was 153. The average number per day during the second 14 days
was 142. Assume that the number of loaves sold per day is normally distributed
with standard deviations 1 2 10 , determine whether the average daily
sales are the same under each coupon plan.
We are interested in comparing if 1 2
Assume 1 2 10
And x1 153 x2 142
n1 14 n2 14
Two ways of comparing.
12 22
n1 n2
2.9103
The critical value is
The critical value is 1.96 (two
1.645 (One sided), so
sided). So we conclude that the
conclude that mean for
means are different.
coupon 1 is bigger than
mean for coupon 2.
Unknown unequal variances
If X1 and X2 are normal or n1 and n2 are large
( X 1 X 2 ) ( 1 2 )
~ t( df )
2 2
s s
1
2
n1 n2
where df
s 2
1 n1 s n2
2 2
2
2 2
The Excel tool
calculates this
s n1 n2
2 4 2 4
s automatically, so you
1 2
( x A xB ) ( A B )
5 Variance 80588.58 67592.71
t
* 6 Observations 30 30
7 Hypothesized Mean Difference 0
s12 s22 8 df 58
9
10
t Stat
P(T<=t) one-tail
1.325162
0.095157
n1 n2 11 t Critical one-tail 1.671553
12 P(T<=t) two-tail 0.190314
13 t Critical two-tail 2.001716
14
s12 s22
( x1 x2 ) t 2,df
n1 n2
93.133 2.0017 70.2807
47.5479 to 233.8139
Unknown equal variance
( X 1 X 2 ) ( 1 2 )
~ t( df )
1 1
sp
n1 n2
where df n1 n2 2
( n1 1) s ( n2 1) s
2 2
and s
2 1 2
n1 n2 2
p
H1 : 1 2 Mean
Variable 1 Variable 2
16.86207 14.13725
Variance 16.83744 28.16078
( x1 x1 ) (1 2 ) Observations 29 51
t* Pooled Variance
Hypothesized Mean Difference
24.09599
0
1 1
df 78
sp t Stat 2.386731
n1 n2 P(T<=t) one-tail 0.009711
t Critical one-tail 1.664625