Lecture 8 - University of Pennsylvania
Download
Report
Transcript Lecture 8 - University of Pennsylvania
Lecture 8
• Matched Pairs
• Review
– Summary
– The Flow approach to problem solving
– Example
Announcements
Extra office hours:
– Today, after class – 1:00.
– Sunday, 2-5
– Monday 9-11:30. I also should be in my office
most of the afternoon after 2:15
The Matched Pairs Experiment
• Example 13.04
– It was suspected that salary offers were affected by
students’ GPA, (which caused S12 and S22 to
increase).
– To reduce this variability, the following procedure
was used:
• 25 ranges of GPAs were predetermined.
• Students from each major were randomly selected, one
from each GPA range.
• The highest salary offer for each student was recorded.
– From the data presented can we conclude that
Finance majors are offered higher salaries?
Adminstrative Info for Midterm
•
•
•
•
Location: Steinberg Hall-Dietrich Hall 351
Time: Monday (Feb. 10th), 6:00-8:00 p.m.
Closed book.
Allowed one double-sided 8.5 x 11 note
sheet
• Bring calculator.
Matched Pairs => One-Sample Test
• After taking differences of observations
within each pair, one can continue with a
one-sample test with H0 : D 0
GPA Group Finance Marketing Difference
1
95171
89329
5842
2
88009
92705
-4696
3
98089
99205
-1116
4
106322
99003
7319
5
74566
74825
-259
6
87089
77038
10051
7
88664
78272
10392
8
71200
59462
11738
9
69367
51555
17812
10
82618
81591
1027
.
.
.
.
.
.
.
.
.
The matched pairs hypothesis test
• Solution 13.04 (by hand)
– The parameter tested is D (=1 – 2)
Finance Marketing
– The hypotheses:
H0: D = 0
The rejection region is
H1: D > 0
t > t.05,25-1 = 1.711
– The t statistic:
Degrees of freedom = nD – 1
The matched pairs hypothesis test
• Solution 13.04
x D 5,065
s D 6,647
– Calculate t
x D D
5065 0
t
3.81
sD n 6647 25
The matched pairs hypothesis test
Conclusion:
There is sufficient evidence to infer at 5%
significance level that the Finance MBAs’ highest
salary offer is, on the average, higher than that of
the Marketing MBAs.
Matched Pairs vs. Independent
Samples
• Potential advantage of matched pairs: The
variance of X D can be much less than the variance
of X1 X 2 if the variable(s) on which the pairs are
matched account for much of the variation within
each group.
• However, if the variance of X D is close to the
variance of X1 X 2 , the independent samples
design will produce a more powerful test because
it has almost twice as many degrees of freedom.
Recognizing Matched Pairs
Experiments
• Does there exist some natural relationship between
the first pairs of observations that makes it more
appropriate to compare the first pair than the first
observation in group 1 and the second observation
in group 2?
• Before and after designs
• Example: A researcher for OSHA wants to see
whether cutbacks in enforcement of safety
regulations coincided with an increase in work
related accidents. For 20 industrial plants, she has
number of accidents in 1980 and 1995.
Examples
• Example: A scientist claims that tomatoes will grow large
if they are played soft, soothing music. To test the claim,
10 tomatoes grown without music and 10 tomatoes grown
with music are randomly selected. The tomatoes are
weighed in ounces.
• Example: Many Americans use tax preparation companies
to prepare their taxes. In order to investigate whether there
are are any differences between companies, an experiment
was conducted in which two of the largest companies were
asked to prepare the tax returns of a sample of 55
taxpayers. The amounts of tax payable for each taxpayer
at the two companies were recorded.
Caveat
• Keep in mind the difference between
observational and experimental data in
terms of what can be inferred.
– Does the study of finance/marketing majors in
Example 13.4 show that students educated in
finance are more attractive to prospective
employers?
Additional Example-Problem 13.75
Tire example contd. (Problem 13.49) Suppose
now we redo the experiment: On 20 randomly
selected cars, one of each type of tire is
installed on the rear wheels and, as before, the
cars are driven until the tires wear out. The
number of miles(in 1000s) is stored in Xr1375. Can we conclude that the new tire is superior?
A Review of Chapters 12 and 13
• Summary of techniques seen
• Here (Chapter 14) we build a framework that
helps decide which technique (or techniques)
should be used in solving a problem.
• Logical flow chart of techniques for Chapters
12 and 13 is presented next.
Summary of statistical inference:
Chapters 12 and 13
• Problem objective: Describe a population.
– Data type: Interval
• Descriptive measurement: Central location
– Parameter:
–
–
x
Test statistic: t
s n
s
Interval estimator: x t
2
n
– Required condition: Normal population
Summary - continued
• Problem objective: Describe a population.
– Data type: Interval
• Descriptive measurement: Variability.
– Parameter: s2
– Test statistic:
2
(
n
1
)
s
2
2
– Interval estimator:
LCL
UCL
(n 1) s 2
2 2
(n 1) s 2
2 1 2
– Required condition: normal population.
Summary - continued
• Problem objective: Describe a population.
– Data type: Nominal
– Parameter: p
– Test statistic:
pˆ p
z
p(1 p) n
– Interval estimator:
– Required condition:
pˆ z 2
pˆ (1 pˆ )
n
np 5 and n(1 p) 5 ( for test)
npˆ 5 and n(1 pˆ ) 5 ( for estimate
Summary - continued
• Problem objective: Compare two populations.
– Data type: Interval
• Descriptive measurement: Central location
– Experimental design: Independent samples
» population variances: 12 22
» Parameter: m1 - m2
» Test statistic:
d.f. = n1 + n2 -2
Interval estimator:
( x1 x 2 ) (1 2 )
1
2 1
t
x1 x 2 t 2 s p ( )
1
1
n1 n 2
sp2 ( )
n1 n 2
» Required condition: Normal populations
Summary - continued
• Problem objective: Compare two populations.
– Data type: Interval.
• Descriptive measurement: Central location
– Experimental design: Independent samples
» population variances:
2
1
2
2
d.f.
» Parameter: m1 - m2
» Test statistic:
t
( s12 n1 s 22 / n2 ) 2
( s12 n1 ) 2 ( s 22 n2 )
n1 1
n2 1
Interval estimator:
( x1 x 2 ) ( 1 2 )
s12
s 22
n1
n2
x1 x2 t
» Required condition: Normal populations
2
s12 s22
n1 n2
2
Summary - continued
• Problem objective: Compare two populations.
– Data type: Interval.
• Descriptive measurement: Central location
– Experimental design: Matched pairs
d.f. = nD - 1
» Parameter: mD
» Test statistic:
t
Interval estimator:
xD D
sD
nD
xD t / 2,n 1
» Required condition: Normal differences
sD
nD
Problem objective?
Describe a population
Compare two populations
Data type?
Data type?
Nominal
Interval
Z test &
estimator of p
Type of descriptive
measurement?
Central location
Variability
Type of descriptive
measurement?
Central location
t- test &
2- test &
estimator of estimator of 2
Continue
Nominal
Interval
Z test &
estimator of p1-p2
Variability
F- test &
estimator of 12/22
Experimental design?
Continue
Experimental design?
Continue
Independent
samples
Population variances?
Equal
t- test &
estimator of 1-2
(Equal variances)
Unequal
t- test &
estimator of 1-2
(Unequal variances)
Continue
Matched
pairs
t- test &
estimator of D
Identifying the appropriate technique
• Example 14.1
– Is the antilock braking system (ABS) really effective?
– Two aspects of the effectiveness were examined:
• The number of accidents.
• Cost of repair when accidents do occur.
– An experiment was conducted as follows:
• 500 cars with ABS and 500 cars without ABS were randomly
selected.
• For each car it was recorded whether the car was involved in an
accident.
• If a car was involved with an accident, the cost of repair was
recorded.
Identifying the appropriate technique
• Example – continued
– Data
• 42 cars without ABS had an accident,
• 38 cars equipped with ABS had an accident
• The costs of repairs were recorded (see Xm14-01).
– Can we conclude that ABS is effective?
Identifying the appropriate technique
• Solution
– Question 1: Is there sufficient evidence to infer
that the cost of repairing accident damage in
ABS equipped cars is less than that of cars
without ABS?
– Question 2: How much cheaper is it to repair
ABS equipped cars than cars without ABS?
Question 2: Compare the mean repair
costs per accident
• Solution
Problem objective?
Describing a single population
Compare two populations
Data type?
Cost of repair per accident
Interval
Nominal
Type of descriptive
measurements?
Central location
Variability
Question 2: Compare the mean repair
costs per accident
• Solution - continued
Central location
Experimental design?
Independent samples
Population variances
equal?
Equal
Equal
t- test &
estimator of 1-2
(Equal variances)
Run the F test
for the ratio of
two variances.
Unequal
Matched pairs
Question 2: Compare the mean repair
costs per accident
• Solution – continued
– 1 = mean cost of repairing cars without ABS
2 = mean cost of repairing cars with ABS
– The hypotheses tested
H0: 1 – 2 = 0
H1: 1 – 2 > 0
– For the equal variance case we use
t
( x1 x 2 ) (1 2 )
1 1
sp2 ( )
n1 n2
d.f . n1 n2 2
Question 2: Compare the mean repair
costs per accident
• Solution – continued
– To determine whether the population variances
differ we apply the F test
– From JMP we have (Xm14-01)
F-Test Two-Sample for Variances
Do not reject H0.
There is insufficient
evidence to conclude
that the two variances are
unequal.
Cost 1991 Cost 1992
Mean
2075
1714
Variance
450343
390409
Observations
42
38
df
41
37
F
1.15
P(F<=f) one-tail
0.3313
F Critical one-tail
1.7129
Question 2: Compare the mean repair
costs per accident
• Solution – continued
– Assuming the variances are really equal we run
the equal-variances t-test of the difference
between two means
At 5% significance level
there is sufficient evidence
to infer that the cost of repairs
after accidents for cars with
ABS is smaller than the cost
of repairs for cars without ABS.
Mean
2075
Variance
450343
Observations
42
Pooled Variance
421913
Hypothesized Mean Difference
0
df
78
t Stat
2.48
P(T<=t) one-tail
0.0077
t Critical one-tail
1.6646
P(T<=t) two-tail
0.0153
t Critical two-tail
1.9908
1714
390409
38
Checking required conditions
• The two populations should be normal (or at
least not extremely nonnormal)
Cost without ABS
15
10
5
0
900
1400
1900
2400
2900
3400
More
Frequency
20
15
10
5
0
900
1400
1900
2400
2900
3400
3900
More
Question 3: Estimate the difference in
repair costs
• Solution
– Use Estimators Workbook: t-Test_2 Means (EqVar) worksheet
t-Estimate of the Difference Between Two Means (Equal-Variances)
Mean
Variance
Sample size
Pooled Variance
Confidence level
Sample 1
2075
450343
42
421913
0.95
Sample 2 Confidence Interval Estimate
1714
361
+/-'
390409
Lower confidence limit
38
Upper confidence limit
290
71
651
We estimate that the cost of repairing a car not equipped with ABS is between $71
and $651 more expensive than to repair an ABS equipped car.