Chapter 10b
•Hypothesis Tests About the DifferenceHypothesis Tests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample Case Independent Samples, Small-Sample Case
•Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about μμ1 – 1 – μμ2: Small Sample2: Small Sample
•Inference About the Difference between the Means of Two Populations: Matched Samples
Hypothesis Tests About the DifferenceHypothesis Tests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample CaseIndependent Samples, Small-Sample Case
Example: Specific MotorsExample: Specific Motors
Recall that Specific Motors ofRecall that Specific Motors of
Detroit has developed a newDetroit has developed a new
automobile known as the M car.automobile known as the M car.
12 M cars and 8 J cars (from Japan)12 M cars and 8 J cars (from Japan)
were road tested to compare miles-per-gallon were road tested to compare miles-per-gallon
(mpg)(mpg)
performance. The sample statistics are shown performance. The sample statistics are shown
on theon the
next slide.next slide.
Example: Specific MotorsExample: Specific Motors
Sample SizeSample Size
Sample MeanSample Mean
Sample Std. Dev.Sample Std. Dev.
Sample #1Sample #1M CarsM Cars
Sample #2Sample #2J CarsJ Cars
12 cars12 cars 8 cars8 cars
29.8 mpg 27.3 mpg29.8 mpg 27.3 mpg
2.56 mpg 1.81 mpg2.56 mpg 1.81 mpg
Can we conclude, using a .05 level of Can we conclude, using a .05 level of significance, that the miles-per-gallon (significance, that the miles-per-gallon (mpgmpg) ) performance of M cars isperformance of M cars isgreater than the miles-per-gallon performance of greater than the miles-per-gallon performance of J cars?J cars?
Hypothesis Tests About the DifferenceHypothesis Tests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample CaseIndependent Samples, Small-Sample Case
HH00: : 1 1 - - 22 << 0 0
HHaa: : 1 1 - - 22 > 0 > 0where: where: 11 = mean = mean mpgmpg for the population of M cars for the population of M cars22 = mean = mean mpgmpg for the population of J cars for the population of J cars
1. Determine the hypotheses.1. Determine the hypotheses.
Hypothesis Tests About the DifferenceHypothesis Tests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample CaseIndependent Samples, Small-Sample Case
Using the Test StatisticUsing the Test Statistic
HypothesisHypothesis Tests About the DifferenceTests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample CaseIndependent Samples, Small-Sample Case
2. Specify the level of significance.2. Specify the level of significance.
3. Select the test statistic.3. Select the test statistic.
= .05= .05
4. State the rejection rule.4. State the rejection rule.Reject Reject HH00 if if tt > 1.734 > 1.734
(18 degrees of freedom)(18 degrees of freedom)
tx x
s n n
( ) ( )
( )1 2 1 2
21 21 1
t
x x
s n n
( ) ( )
( )1 2 1 2
21 21 1
where:where:2 2
2 1 1 2 2
1 2
( 1) ( 1)
2
n s n ss
n n
2 22 1 1 2 2
1 2
( 1) ( 1)
2
n s n ss
n n
Using the Test StatisticUsing the Test Statistic
Hypothesis Tests About the DifferenceBetween the Means of Two Populations:
Independent Samples, Small-Sample Case
5. Compute the value of the test statistic.5. Compute the value of the test statistic.
Pooled Variance Estimator of Pooled Variance Estimator of 22
2 22 1 1 2 2
1 2
( 1) ( 1)
2
n s n ss
n n
2 22 1 1 2 2
1 2
( 1) ( 1)
2
n s n ss
n n
2 2
2 (12 1)(2.56) (8 1)(1.81) 95.02235.27902
12 8 2 18s
2 22 (12 1)(2.56) (8 1)(1.81) 95.0223
5.2790212 8 2 18
s
continuedcontinued
Using the Test StatisticUsing the Test Statistic
Hypothesis Tests About the DifferenceHypothesis Tests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample CaseIndependent Samples, Small-Sample Case
5. Compute the value of the test statistic.5. Compute the value of the test statistic.(continued)(continued)
tt Statistic Statistic
(29.8 27.3) 0 2.5 2.384
1.04871 15.27902( )12 8
t
(29.8 27.3) 0 2.5 2.384
1.04871 15.27902( )12 8
t
tx x
s n n
( ) ( )
( )1 2 1 2
21 21 1
t
x x
s n n
( ) ( )
( )1 2 1 2
21 21 1
Using the Test StatisticUsing the Test Statistic
6. Determine whether to reject 6. Determine whether to reject HH00..
At the .05 level of significance, the At the .05 level of significance, the samplesampleevidence indicates that the mean evidence indicates that the mean mpgmpg of of M carsM carsis greater than the mean is greater than the mean mpgmpg of J cars. of J cars.
tt = 2.384 > = 2.384 > tt.05.05 = 1.734, so we reject = 1.734, so we reject HH00..
Hypothesis Tests About the DifferenceHypothesis Tests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample CaseIndependent Samples, Small-Sample Case
Using the Test StatisticUsing the Test Statistic
Step 1Step 1 Select the Select the ToolsTools menu menu
Step 2Step 2 Choose the Choose the Data AnalysisData Analysis option option
Step 3Step 3 Choose Choose tt-Test: Two Sample Assuming Equal-Test: Two Sample Assuming Equal
Variances Variances from the list of Analysis Toolsfrom the list of Analysis Tools
… … continuedcontinued
Excel’s “Excel’s “tt-Test: Two Sample Assuming Equal -Test: Two Sample Assuming Equal Variances” ToolVariances” Tool
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Small SampleSmall Sample
Excel’s “Excel’s “tt-Test: Two Sample Assuming Equal -Test: Two Sample Assuming Equal Variances” ToolVariances” Tool
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Small SampleSmall Sample
Step 4Step 4 When the When the tt-Test: Two Sample Assuming-Test: Two Sample Assuming
Equal Variances dialog box appears:Equal Variances dialog box appears:
… … continuedcontinued
Enter A1:A13 in the Enter A1:A13 in the Variable 1 RangeVariable 1 Range box box
Enter B1:B9 in the Enter B1:B9 in the Variable 2 RangeVariable 2 Range box box
Type 0 in the Type 0 in the Hypothesized MeanHypothesized Mean
DifferenceDifference box box
Excel’s “Excel’s “tt-Test: Two Sample Assuming Equal -Test: Two Sample Assuming Equal Variances” ToolVariances” Tool
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Small SampleSmall Sample
Click Click OKOK
(Any upper left-hand corner cell indicating(Any upper left-hand corner cell indicating
where the output is to begin may be entered)where the output is to begin may be entered)
Enter D1 in the Enter D1 in the Output RangeOutput Range box boxSelect Select Output RangeOutput Range
Type .01 in the Type .01 in the AlphaAlpha box boxSelect Select LabelsLabels
Step 4Step 4 (continued) (continued)
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Small SampleSmall Sample
Value WorksheetValue WorksheetA B C D E F
1 M Car J Car t-Test: Two-Sample Assuming Equal Variances
2 25.1 25.63 32.2 28.1 M Car J Car
4 31.7 27.9 Mean 29.78333 27.3
5 27.6 25.3 Variance 6.556061 3.265714
6 28.5 30.1 Observations 12 8
7 33.6 27.5 Pooled Variance 5.276481
8 30.8 25.1 Hypothesized Mean Diff. 0
9 26.2 28.8 df 18
10 29.0 t Stat 2.368555
11 31.0 P(T<=t) one-tail 0.014626
12 31.7 t Critical one-tail 1.734063
13 30.0 P(T<=t) two-tail 0.029251
14 t Critical two-tail 2.100924
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Small SampleSmall Sample
Hypothesis Tests About the DifferenceHypothesis Tests About the DifferenceBetween the Means of Two Populations:Between the Means of Two Populations: Independent Samples, Small-Sample CaseIndependent Samples, Small-Sample Case
Using the Using the p p ValueValue
4. Compute the value of the test statistic.4. Compute the value of the test statistic.
5. Compute the 5. Compute the pp–value.–value.
The Excel worksheet shows The Excel worksheet shows pp-value = .0146-value = .0146
6. Determine whether to reject 6. Determine whether to reject HH00..
Because Because pp–value = .0146 < –value = .0146 < = .05, we reject = .05, we reject HH00..
The Excel worksheet shows The Excel worksheet shows tt = 2.369 = 2.369
Inference About the Difference between the Means of Two Populations: Matched
Samples
With a With a matched-sample designmatched-sample design each sampled item each sampled item provides a pair of data values.provides a pair of data values.
This design often leads to a smaller sampling This design often leads to a smaller sampling errorerror than the independent-sample design than the independent-sample design becausebecause variation between sampled items is variation between sampled items is eliminated as aeliminated as a source of sampling error.source of sampling error.
Example: Express DeliveriesExample: Express Deliveries
A Chicago-based firm hasA Chicago-based firm has
documents that must be quicklydocuments that must be quickly
distributed to district officesdistributed to district offices
throughout the U.S. The firmthroughout the U.S. The firm
must decide between two deliverymust decide between two delivery
services, UPX (United Parcel Express) and services, UPX (United Parcel Express) and INTEXINTEX
(International Express), to transport its (International Express), to transport its documents. documents.
Inference About the Difference between Inference About the Difference between the Means of Two Populations: the Means of Two Populations: Matched Matched
SamplesSamples
Example: Express DeliveriesExample: Express Deliveries
In testing the delivery timesIn testing the delivery times
of the two services, the firm sentof the two services, the firm sent
two reports to a random sampletwo reports to a random sample
of its district offices with oneof its district offices with one
report carried by UPX and thereport carried by UPX and the
other report carried by INTEX. Do the data on other report carried by INTEX. Do the data on thethe
next slide indicate a difference in mean next slide indicate a difference in mean deliverydelivery
times for the two services? Use a .05 level of times for the two services? Use a .05 level of significance.significance.
Inference About the Difference between Inference About the Difference between the Means of Two Populations: the Means of Two Populations: Matched Matched
SamplesSamples
32323030191916161515181814141010 771616
2525242415151515131315151515 88 991111
UPXUPX INTEXINTEX DifferenceDifferenceDistrict OfficeDistrict OfficeSeattleSeattleLos AngelesLos AngelesBostonBostonClevelandClevelandNew YorkNew YorkHoustonHoustonAtlantaAtlantaSt. LouisSt. LouisMilwaukeeMilwaukeeDenverDenver
Delivery Time (Hours)Delivery Time (Hours)
7 7 6 6 4 4 1 1 2 2 3 3 -1 -1 2 2 -2 -2 55
Inference About the Difference between the Means of Two Populations: Matched Samples
HH00: : d d = 0= 0
HHaa: : dd Let Let d d = the mean of the = the mean of the differencedifference values for the values for the two delivery services for the populationtwo delivery services for the population of district officesof district offices
1. Determine the hypotheses.1. Determine the hypotheses.
Using the Test StatisticUsing the Test Statistic
Inference About the Difference between Inference About the Difference between the Means of Two Populations: the Means of Two Populations: Matched Matched
SamplesSamples
Inference About the Difference between Inference About the Difference between the Means of Two Populations: the Means of Two Populations: Matched Matched
SamplesSamples
2. Specify the level of significance.2. Specify the level of significance.
3. Select the test statistic.3. Select the test statistic.
= .05= .05
4. State the rejection rule.4. State the rejection rule.Reject Reject HH00 if | if |t|t| > 2.262 > 2.262
(9 degrees of freedom)(9 degrees of freedom)
where:where:
Using the Test StatisticUsing the Test Statistic
d
d
dt
s n
d
d
dt
s n
idd
n id
dn
and and 2( )
1i
d
d ds
n
2( )
1i
d
d ds
n
Inference About the Difference between the Means of Two Populations: Matched Samples
5. Compute the value of the test statistic.5. Compute the value of the test statistic.
Using the Test StatisticUsing the Test Statistic
ddni ( ... )
.7 6 5
102 7d
dni ( ... )
.7 6 5
102 7
sd dndi
( ) ..
2
176 19
2 9sd dndi
( ) ..
2
176 19
2 9
2.7 0 2.94
2.9 10d
d
dt
s n
2.7 0
2.942.9 10
d
d
dt
s n
Inference About the Difference between the Means of Two Populations: Matched Samples
6. Determine whether to reject 6. Determine whether to reject HH00..
At the .05 level of significance, the sample At the .05 level of significance, the sample evidenceevidence
indicates that there is a significant difference indicates that there is a significant difference betweenbetween
the mean delivery times for the two services. the mean delivery times for the two services.
tt = 2.94 > = 2.94 > tt.05/2.05/2 = 2.262, so we reject = 2.262, so we reject HH00..
Using the Test StatisticUsing the Test Statistic
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Matched Matched
SamplesSamples
Step 1Step 1 Select the Select the ToolsTools menu menu
Step 2Step 2 Choose the Choose the Data AnalysisData Analysis option option
Step 3Step 3 Choose Choose tt-Test: Paired Two Sample for Means-Test: Paired Two Sample for Means
from the list of Analysis Toolsfrom the list of Analysis Tools
… … continuedcontinued
Excel’s “Excel’s “tt-Test: Paired Two Sample for Means” -Test: Paired Two Sample for Means” ToolTool
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Matched Matched
SamplesSamples Excel’s “Excel’s “tt-Test: Paired Two Sample for Means” Tool-Test: Paired Two Sample for Means” Tool
Enter E2 (your choice) in the Enter E2 (your choice) in the Output RangeOutput Range boxbox
Click Click OKOK
Select Select Output RangeOutput RangeType .05 in the Type .05 in the AlphaAlpha box boxSelect Select LabelsLabels
Type 0 in the Type 0 in the Hypothesized Mean DifferenceHypothesized Mean Difference boxbox
Enter C1:C11 in the Enter C1:C11 in the Variable 2 RangeVariable 2 Range box boxEnter B1:B11 in the Enter B1:B11 in the Variable 1 RangeVariable 1 Range box box
Step 4Step 4 When the When the tt-Test: Paired Two Sample for Means-Test: Paired Two Sample for Means dialog box appears:dialog box appears:
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Matched Matched
SamplesSamples
Value WorksheetValue Worksheet
Using Excel to Conduct aUsing Excel to Conduct aHypothesis Test about Hypothesis Test about 11 – – 22: : Matched Matched
SamplesSamples
A B C D E F G1 Office UPX INTEX2 Seattle 32 25 t-Test: Paired Two Sample for Means3 L.A. 30 244 Boston 19 15 UPX INTEX5 Cleveland 16 15 Mean 17.7 156 N.Y.C. 15 13 Variance 62.011 31.77787 Houston 18 15 Observations 10 108 Atlanta 14 15 Pearson Correlation 0.96129 St. Louis 10 8 Hypothesized Mean Difference 010 Milwauk. 7 9 df 911 Denver 16 11 t Stat 2.936212 P(T<=t) one-tail 0.008313 t Critical one-tail 1.833114 P(T<=t) two-tail 0.016615 t Critical two-tail 2.2622
Inference About the Difference between Inference About the Difference between the Means of Two Populations: the Means of Two Populations: Matched Matched
SamplesSamples Using the Using the p p ValueValue
4. Compute the value of the test statistic.4. Compute the value of the test statistic.
5. Compute the 5. Compute the pp–value.–value.
The Excel worksheet shows The Excel worksheet shows pp-value = .0166-value = .0166
6. Determine whether to reject 6. Determine whether to reject HH00..
Because Because pp–value = .0166 < –value = .0166 < = .05, we reject = .05, we reject HH00..
The Excel worksheet shows The Excel worksheet shows tt = 2.9362 = 2.9362