Relationship Between Two Quantitative Variables

Download Report

Transcript Relationship Between Two Quantitative Variables

Design of Experiments
2k Designs
Catapult Experiment
An engineering statistics class ran a catapult
experiment to develop a prediction
equation for how far a catapult can throw
a plastic ball. The class manipulated two
factors: how far back the operator draws
the arm (angle), measured in degrees,
and the height of the pin that supports the
rubber band, measured in equally spaced
locations. The results follow…
L. Wang, Department of Statistics
University of South Carolina; Slide 2
Catapult Experiment
Angle
Height
Distance 1
Distance 2
140
2
27
27
180
2
81
67
140
4
67
62
180
4
137
158
Angle
Height
Distance 1
Distance 2
-1
-1
27
27
1
-1
81
67
-1
1
67
62
1
1
137
158
L. Wang, Department of Statistics
University of South Carolina; Slide 3
This is a
2
2
(-1,1)
factor
(level
)
Height
Design
(1,1)
Angle
(-1,-1)
(1,-1)
L. Wang, Department of Statistics
University of South Carolina; Slide 4
Response Notation
a = Average of responses when A (Angle)
is high and B (Height) is low.
 b = Average of responses when B
(Height) is high and A (Angle) is low.
 ab = average of responses when both A
(Angle) and B (Height) are high.
 (1) = Average of responses when both A
(Angle) and B (Height) are low.

L. Wang, Department of Statistics
University of South Carolina; Slide 5
This is a
b
2
2
(-1,1)
factor
(level
)
Height
Design
ab
(1,1)
Angle
(-1,-1)
(1)
(1,-1)
a
L. Wang, Department of Statistics
University of South Carolina; Slide 6
Catapult Experiment
Angle
Height
Distance 1
Distance 2
Avg Distance
140
2
27
27
27
180
2
81
67
74
140
4
67
62
64.5
180
4
137
158
147.5
Angle
Height
Distance 1
Distance 2
Avg Distance
-1
-1
27
27
27
1
-1
81
67
74
-1
1
67
62
64.5
1
1
137
158
147.5
L. Wang, Department of Statistics
University of South Carolina; Slide 7
Catapult Experiment – Main
Effects
Angle
Height
Avg Distance
-1
-1
(1)
27
1
-1
a
74
-1
1
b
64.5
1
1
ab
147.5
Effect of Angle = avg response at high level –
avg response at low level
a  ab (1)  b 74  147 .5 27  64.5
effect of Angle 



 65
2
2
2
2
L. Wang, Department of Statistics
University of South Carolina; Slide 8
Catapult Experiment – Main
Effects
Angle
Height
Avg Distance
-1
-1
(1)
27
1
-1
a
74
-1
1
b
64.5
1
1
ab
147.5
Effect of Height = avg response at high level –
avg response at low level
b  ab (1)  a 64.5  147 .5 27  74
effect of Height 



 55.5
2
2
2
2
L. Wang, Department of Statistics
University of South Carolina; Slide 9
Interactions

If Angle and Height interact, then the
effect of Angle depends on the specific
level of Height.

An interaction plot plots the means of one
factor given the levels of the other factor.
L. Wang, Department of Statistics
University of South Carolina; Slide 10
Interaction Plot
160
A
v
g
ab
140
120
Height(1): 4
100
2
b
80
D
i
s
t
60
20
Height(-1): 2
1
40
a
(1)
0
-1
140
-0.8
-0.6
-0.4
-0.2
0
Angle
0.2
0.4
0.6
0.8
1
180
L. Wang, Department of Statistics
University of South Carolina; Slide 11
Interaction of A (Angle) and B (Height)
 2  1 [ab  a]  [b  (1)]
AB interactio n 

2
2
(1)  ab  a  b 27  147 .5  74  64.5
AB interactio n 

 18
2
2
We have a positive interaction which is
smaller in size than the main effects
(effect of Angle = 65 and effect of Height
= 55.5.
L. Wang, Department of Statistics
University of South Carolina; Slide 12
The model we are fitting is
yi  0  1xi1  2 xi 2  12 xi1xi 2   i
yi is the distance for the ith test run
β0 is the y-intercept
β1 is the regression coefficient associated with angle
β2 is the regression coefficient associated with height
β12 is the regression coefficient associated with
angle/height interaction
εi is the random error
L. Wang, Department of Statistics
University of South Carolina; Slide 13
Table of Contrasts
Intercept
x1 (Angle)
x2 (Height)
x1x2
1
-1
-1
1
(1)
1
1
-1
-1
a
1
-1
1
-1
b
1
1
1
1
ab
This table tells us how to combine the average response for
each treatment combination to form the numerator of our
estimate of the effect.
For two-level factorial designs, the denominator for estimating
main effects and interactions will always by one-half of the
number of distinct factorial treatment combinations. Ex: 22 =
4, so our denominator is 2.
Use total number of distinct treatment combinations as
L. Wang, Department of Statistics
denominator for the intercept.
University of South Carolina; Slide 14
Model Coefficients are Slopes
A slope represents the expected change in
the response when we increase one factor
by one unit while holding the other factor
constant.
 Going from -1 to 1 in a factor represents
movement of two units.
 So:
est effect

Est regression coef 
2
L. Wang, Department of Statistics
University of South Carolina; Slide 15
Multiple Linear Regression
Dependent Variable: Distance
 Independent Variables: Angle, Height, Angle*Height



Parameter estimates:
Variable
Estimate
Std Err
Tstat
P-value
Intercept
78.25
3.21617
24.330
<0.0001
Angle
32.5
3.21617
10.105
0.0005
Height
27.75
3.21617
8.628
0.001
Angle*Height
9
3.21617
2.798
0.0489
ANOVA table:
Source
DF
SS
MS
F-stat
P-value
Model
3
15258.5
5086.1665
61.46425
0.0008
Error
4
331
82.75
Total
7
15589.5
L. Wang, Department of Statistics
University of South Carolina; Slide 16
k
2
Full Factorial Designs
We will look at every possible combination
of the two levels for k factors.
 Let’s extend our catapult Experiment to
include:

– Angle: 180, Full
– Peg Height: 3, 4
– Stop Position: 3, 5
– Hook Position: 3, 5

Each combination was run twice.
L. Wang, Department of Statistics
University of South Carolina; Slide 17
Angle Pg Ht Stp Ps
Hk Ps
Dist
Angle Pg Ht Stp Ps
Hk Ps
Dist
-1
-1
-1
-1
363
-1
-1
-1
-1
354
1
-1
-1
-1
401
1
-1
-1
-1
406
-1
1
-1
-1
416
-1
1
-1
-1
460
1
1
-1
-1
470
1
1
-1
-1
490
-1
-1
1
-1
380
-1
-1
1
-1
383
1
-1
1
-1
437
1
-1
1
-1
440
-1
1
1
-1
474
-1
1
1
-1
477
1
1
1
-1
532
1
1
1
-1
558
-1
-1
-1
1
426
-1
-1
-1
1
413
1
-1
-1
1
474
1
-1
-1
1
494
-1
1
-1
1
480
-1
1
-1
1
502
1
1
-1
1
520
1
1
-1
1
555
-1
-1
1
1
446
-1
-1
1
1
467
1
-1
1
1
512
1
-1
1
1
550
-1
1
1
1
480
-1
1
1
1
485
1
1
1
1
580
1
1
L. Wang,1Department of
1 Statistics591
University of South Carolina; Slide 18
Angle Pg Ht Stp Ps
Hk Ps Run Avg Dist
-1
-1
-1
-1
(1)
363.5
1
-1
-1
-1
a
403.5
-1
1
-1
-1
b
438
1
1
-1
-1
ab
480
-1
-1
1
-1
c
381.5
1
-1
1
-1
ac
438.5
-1
1
1
-1
bc
475.5
1
1
1
-1
abc
545
-1
-1
-1
1
d
419.5
1
-1
-1
1
ad
484
-1
1
-1
1
bd
491
1
1
-1
1
abd
537.5
-1
-1
1
1
cd
456.5
1
-1
1
1
acd
531
-1
1
1
1
bcd
482.5
1
1
1
1
abcd 585.5
L. Wang, Department of Statistics
University of South Carolina; Slide 19
4
2
Model:
yi  0  1xi1  2 xi 2  3 xi 3  4 xi 4
 12 xi1xi 2  13 xi1xi 3  14 xi1xi 4
 23 xi 2 xi 3  24 xi 2 xi 4  34 xi 3 xi 4
 123 xi1 xi 2 xi 3  124 xi1 xi 2 xi 4
 134 xi1xi 3 xi 4  234 xi 2 xi3 xi 4
 1234 xi1xi 2 xi3 xi 4
L. Wang, Department of Statistics
University of South Carolina; Slide 20
Effects

Use Contrast Table for numerator.

Denominator is one half the number of
distinct combinations.

Use total number of distinct combinations
as denominator for Intercept.
L. Wang, Department of Statistics
University of South Carolina; Slide 21
I
x1
x2
x3
x4
x1
x1
x1
x2
x2
x3
x1
x1
x1
x2
x1
2
3
4
3
4
4
23
24
34
34
234
Run
Avg
Dist
1
-1
-1
-1
-1
(1)
363.5
1
1
-1
-1
-1
a
403.5
1
-1
1
-1
-1
b
438
1
1
1
-1
-1
ab
480
1
-1
-1
1
-1
c
381.5
1
1
-1
1
-1
ac
438.5
1
-1
1
1
-1
bc
475.5
1
1
1
1
-1
abc
545
1
-1
-1
-1
1
d
419.5
1
1
-1
-1
1
ad
484
1
-1
1
-1
1
bd
491
1
1
1
-1
1
abd
537.5
1
-1
-1
1
1
cd
456.5
1
1
-1
1
1
acd
531
1
-1
1
1
1
bcd
482.5
1
1
1
1
1
L. Wang, Department of Statistics
University of South Carolina;
22
abcd Slide585.5
Fractions of 2k Factorial Designs
Used to reduce the total number of
treatment combinations while preserving
the basic factorial structure.
 Main effects tend to dominate two-factor
interactions, two-factor interactions tend
to dominate three-factor interactions, and
so on.
 We will sacrifice the ability to estimate the
higher-order interactions in order to
reduce the number of treatment
combinations.

L. Wang, Department of Statistics
University of South Carolina; Slide 23
Half Fraction of 23 Design
I
x1
x2
x3
x1x2
x1x3
x2x3
x1x2x3
1
-1
-1
-1
1
1
1
-1
1
1
-1
-1
-1
-1
1
1
1
-1
1
-1
-1
1
-1
1
1
1
1
-1
1
-1
-1
-1
1
-1
-1
1
1
-1
-1
1
1
1
-1
1
-1
1
-1
-1
1
-1
1
1
-1
-1
1
-1
1
1
1
1
1
1
1
1
I
x1
x2
x3
x1x2
x1x3
x2x3
x1x2x3
1
1
-1
-1
-1
-1
1
1
1
-1
1
-1
-1
1
-1
1
1
-1
-1
1
1
-1
-1
1
1
1
1
1
1
1
1
1
L. Wang, Department of Statistics
University of South Carolina; Slide 24
Half Fraction of 23 Design
I
x1
x2
x3
x1x2
x1x3
x2x3
x1x2x3
1
-1
-1
-1
1
1
1
-1
1
1
-1
-1
-1
-1
1
1
1
-1
1
-1
-1
1
-1
1
1
1
1
-1
1
-1
-1
-1
1
-1
-1
1
1
-1
-1
1
1
1
-1
1
-1
1
-1
-1
1
-1
1
1
-1
-1
1
-1
1
1
1
1
1
1
1
1
I
x1
x2
x3
x1x2
x1x3
x2x3
x1x2x3
1
-1
-1
-1
1
1
1
-1
1
1
1
-1
1
-1
-1
-1
1
1
-1
1
-1
1
-1
-1
1
-1
1
1
-1
-1
1
-1
L. Wang, Department of Statistics
University of South Carolina; Slide 25
Aliasing Effects
When we alias one effect with another
(eg: Aliasing effect of A with effect of BC),
we can not distinguish one effect from the
other (eg: we can not distinguish effect of
A from effect of BC.).
 Positive half fraction of a 23 design uses
x1x2x3 = 1 to select the treatment
combinations to be run.
 Negative half fraction of a 23 design uses
x1x2x3 = -1 to select the treatment
combinations to be run.

L. Wang, Department of Statistics
University of South Carolina; Slide 26
Aliasing Effects

We say that ABC is the defining interaction.

General notation: 23-1
– 2 indicates number of factor levels.
– Exponent 3 indicates the number of factors.
– Exponent -1 indicates a half (2-1) fraction.
– Total number of treatment combination is 23-1 = 4.
L. Wang, Department of Statistics
University of South Carolina; Slide 27
The Alias Structure
ABC as the defining interaction is equated
to the intercept, I.
 Then add each effect to the defining
interaction using modulo 2 arithmetic.
 Eg: A + ABC = BC
B + ABC = AC
C + ABC = AB

L. Wang, Department of Statistics
University of South Carolina; Slide 28
The Alias Structure
I
=
ABC
A
=
BC
B
=
AC
C
=
AB
AB
=
C
AC
=
B
BC
=
A
or
I
=
ABC
A
=
BC
B
=
AC
C
=
AB
yi  0  1xi1  2 xi 2  3 xi 3   i
L. Wang, Department of Statistics
University of South Carolina; Slide 29
Warning
 Remember
that aliases can not be
distinguished from one another,
so be careful what you alias.
L. Wang, Department of Statistics
University of South Carolina; Slide 30