Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Hypothesis Tests
Parametric Tests
(Metric Tests)
Independent Paired
Samples Samples
* Two-Group t test * Paired t test
* z test
Comparing Two Population Means:
Independent Sampling
Difference of Two Means…
Population 1 2 Population
1 2
1 2
X1 – X2 values Sampling
Distribution
1 - 2
Properties of the Sampling Distribution
s 12 s 22
s ( x -x ) = +
1 2
n1 n2
Large-Sample Confidence Interval for (μ1 – μ2)
Example 1: Comparing Mean Prices of Japanese
and U.S. Cars
An economist decided to test the hypothesis that higher retail
prices are being charged for Japanese automobiles in Japan
than in the United States. She obtained independent random
samples of 50 retail sales in the United States and 50 retail
sales in japan over the same time period and for the same
model of automobile and converted the Japanese sales prices
from yen to dollars using conversion rates. The data, saved in
the AUTOSTUDY file. Form a 95% confidence interval for the
difference between the population mean retail prices of this
automobile model for the two countries. Interpret the result.
AUTOSTUDY file
AUTOSTUDY data
USA 18200 16200 17200 18700 18400 16600 14900 16800 12100 10800 18500 15500 16200
15600 17100 18100 18900 19000 17300 18800 14900 16700 20300 17100 14600 17200
16300 18200 19500 13200 16800 12900 17200 18200 16300 16800 16400 18600
13000 18400 16900 13300 16300 15900 16600 17600 16000 17100 14600 18000
JAPAN 18500 14000 18200 21100 13900 18700 14900 16400 16300 18000 16800 19800 17300
14800 18200 16700 20200 16200 20400 17900 15500 15400 17700 17100 17900 17400
16600 14900 16300 16500 15400 17600 20100 16400 18000 17500 18400 19800
18200 16200 18500 16900 17600 14400 21600 18600 16200 14300 12500 20000
Example 1: Comparing Mean Prices of Japanese
and U.S. Cars
Large-Sample Test of Hypothesis about (µ1 – µ2)
s12 s22
Alternative Rejection
» +
n1 n2
Hypothesis Region
Research Questions
No Difference Pop 1 Pop 2 Pop 1 Pop 2
Hypothesis Any Difference Pop 1 < Pop 2 Pop 1 > Pop 2
H0 m1 - m2 = 0 m1 - m2 ³ 0 m1 - m2 £ 0
Ha m1 - m2 ¹ 0 m1 - m2 < 0 m1 - m2 > 0
Conditions Required for Valid Large Sample
Inferences about (μ1 – μ2)
Example : Comparing Mean Prices of Japanese and
U.S. Cars with a Large-Sample
Refer to the study of retail prices of an automobile sold in
the United States and Japan, Example 1. Another way to
compare the mean retail prices for the two countries is to
conduct a test of hypothesis. Conduct the test using
α=0.05.
AUTOSTUDY file
Example : Comparing Mean Prices of Japanese and
U.S. Cars
Example 2: Comparing Mean Prices of Japanese
and U.S. Cars
Reject H0
.05
-1.645 0 t
z statistics=-1.62
Example 2: Comparing Mean Prices of Japanese
and U.S. Cars
P-value of z statistics is=0.0526
-1.62 0 t
Example : Comparing Mean Prices of Japanese and
U.S. Cars
Excel Output
z-Test: Two Sample for Means
Variable 1 Variable 2
Mean 16596 17236
z -1.618202269
æ 1 1ö
(x 1 )
- x 2 ± ta 2
s ×ç + ÷
2
p
è n1 n 2 ø
sp =
2 ( n1 - 1) × s1
2
+ ( n2 - 1) × s 2
2
n1 + n2 - 2
.025 .025
-2.064 0 2.064 t
Small-Sample Test Solution
s 2p
1 1 2 2
n 1 s 2
n 1 s 2
n1 n2 2
11 11.30 15 11.16
2 2
1.489
11 15 2
t
x1 x2 1 2 3.27 2.53 0
1.53
1 1 1 1
s
2
1.489
p
n1 n2 11 15
Small-Sample Test Solution
.025 .025
-2.064 0 2.064 t
Small-Sample Test
Solution*
s
2 1 1 2 2
n 1 s 2
n 1 s 2
n1 n2 2
p
18.793
15 11 2
t
x1 x2 1 2 22.00 20.27 0
1.00
1 1 1 1
s
2
18.793
p
n1 n2 15 11
Small-Sample Test
Solution*
.025 .025
-2.06 0 2.06 t
t statistics=4.97
Example : Comparing Manager Performance
P-value of t statistics is=0.00004
.00002 .00002
-4.97 0 4.97 t
Example : Comparing Manager Performance
Excel Output
t-Test: Two-Sample Assuming Equal Variances
GROUP1 GROUP2
Mean 65.33333333 49.46666667
Variance 43.6969697 87.12380952
Observations 12 15
Pooled Variance 68.016
Hypothesized Mean Difference 0
df 25
t Stat 4.96746167
P(T<=t) one-tail 2.02726E-05
t Critical one-tail 1.708140761
P(T<=t) two-tail 4.05453E-05
t Critical two-tail 2.059538553
1. Equal sample sizes (n1 = n2 = n)
Confidence interval: ( x1 - x2 ) ± ta 2 ( s 2
1 +s
2
2 ) n
H0: ( m1 - m2 ) = 0
Test statistic t = ( x1 - x2 ) ( )
s12 + s22 n
Confidence interval: ( x1 - x2 ) ± ta 2 ( s 2
1 ) (
n1 + s n2
2
2 )
Test statistic H0:
( m1 - m2 ) = 0
t = ( x1 - x2 ) ( ) (
s12 n1 + s22 n2 )
where t is based on …
v=
(s 2
1 n1 + s n2
2
2 ) 2
(s
2
1 n1 ) + (s
2 2
2 n2 ) 2
n1 - 1 n2 - 1
Suppose you want to compare the mean daily sales of two restaurants located in
the same city. If you were to record the restaurants’ total sales for each of 12
randomly selected days during a 6-month period, the results appear as shown
below. Do these data provide evidence of a difference between the mean daily
sales of the two restaurants?
H 0 : (m1 - m2 ) = 0
H a : (m1 - m2 ) ¹ 0
Paired-Difference Experiment
Confidence interval:
Large-SampleTest of Hypothesis about Paired(µ1 – µ2)
H0: µd = D0
d - D0 d - D0
Test Statistic: z= »
s d nd sd nd
Alternative Rejection
Hypothesis Region
Ha: µd > D0 z z
Ha: µd < D0 z z
Ha: µd ≠ D0 z z / 2 or z z / 2
where z is chosen so that P(z > z) =
Small-Sample Test of Hypothesis about (µ1 – µ2)
H0: µd = D0
Test d - D0
t=
Statistic: sd nd
Alternative Rejection
Hypothesis Region
d - D0 82
Test statistic: t= = = 8.88
sd nd 32 / 12
SALES1 SALES2
Mean 1349 1267
Variance 280978.9091 266294.1818
Observations 12 12
Pearson Correlation 0.998489747
Hypothesized Mean Difference 0
df 11
t Stat 8.879914328
P(T<=t) one-tail 1.19506E-06
t Critical one-tail 1.795884819
P(T<=t) two-tail 2.39011E-06
t Critical two-tail 2.20098516
Conditions Required for Valid Large-Sample
Inferences about µd
1. A random sample of differences is selected from the target
population of differences.
2. The sample size nd is large (i.e., nd ≥ 30); due to the
Central Limit Theorem, this condition guarantees that the
test statistic will be approximately normal regardless of the
shape of the underlying probability distribution of the
population.
Conditions Required for Valid Small-Sample
Inferences about µd
1. A random sample of differences is selected from the target
population of differences.
2. The population of differences has a distribution that is
approximately normal.
Paired-Difference Experiment Confidence
Interval Example
d = -4/4= –1 sd = 6.53
Paired-Difference Experiment Confidence
Interval Solution
df = nd – 1 = 4 – 1 = 3 t.05 = 2.353
Sd
d t 2
nd
6.53
1 2.353
4
8.68 d 6.68
Example 8: Paired-Difference Experiment Small-
Sample Test
You work in Human Resources. You want to see if a training
program is effective. You collect the following test score
data:
Name Before After
Sam 85 94
Tamika 94 87
Brian 78 79
Mike 87 88
At the .10 level of significance, was the
training effective?
Null Hypothesis Solution
d = –1 sd = 6.53
Paired-Difference Experiment Small-Sample Test
Solution
p1q1 p2 q2
( p̂1 - p̂2 ) ± za 2s ( p̂ - p̂ ) = ( p̂1 - p̂2 ) ± za 2
1 2
n1
+
n2
p̂1q̂1 p̂2 q̂2
» ( p̂1 - p̂2 ) ± za 2 +
n1 n2
Conditions Required for Valid Large-Sample
Inferences about (p1 – p2)
z=
( p̂1 - p̂2 )
Test Statistic:
s ( p̂ - p̂ )
1 2
p1q1 p2 q2 æ1 1ö x1 + x2
s ( p̂ - p̂ ) = + » p̂q̂ ç + ÷ , p̂ = .
1 2
n1 n2 è n1 n2 ø n1 + n2
Alternative Hypothesis Rejection Region
n2 500 Ha p1-p2≠0
x1 53
(Pos)z_Alpha/2 1.644854
H0: pR – pI = 0
Ha: pR – pI < 0
= .05
nR = 1500 nI = 1500
Critical Value(s):
Reject H0
.05
-1.645 0 z
Example 2- Compare the Unemployment Rate
x MA 74 xCA 129
p̂ MA = = = .0493 p̂CA = = = .0860
n MA 1500 nCA 1500
x MA + xCA 74 + 129
p̂ = = = .0677
n MA + nCA 1500 + 1500
z»
( .0493 - .0860 ) - ( 0 )
æ 1 1 ö
( .0677 ) × (1 - .0677 ) × çè 1500 + 1500 ÷ø
= -4.00
Example 2- Compare the Unemployment
( z ) (s )
2
a 2
2
+s 2
n1 = n2 =
1 2
(ME)2
s
You will need to substitute estimates for the values of 1
2
( z ) (p q + p q )
2
a 2
n1 = n2 =
1 1 2 2
(ME)2
( )( + )
2 2 2
1.96 12 18
n1 = n2 = 2
= 53.44 » 54
(5.8)
Example 4- Finding the Sample Sizes for
Estimating (p1-p2)
PAPERS
F-Test Two-Sample for Variances
Level Level
Mean 26.30769231 19.88889
Variance 69.8974359 23.51634
Observations 13 18
df 12 17
F 2.972292299
P(F<=f) one-tail 0.020035849
F Critical one-tail 2.380654162
Procedure