Вы находитесь на странице: 1из 10

PROBLEM

Bill Afantenou, second year Statistics graduate student at Queensland University of


Technology conducted an experiment to fnd out how, by varying whether he
ordered thic or thin crust, whether !oe was ordered with the pi""a and whether
garlic bread was ordered with the pi""a, a#ect the time it too for a pi""a to be
delivered to the front door of his house$ Being a poor graduate student and
limitation of time, he decided to have only two replicates, %ust to get a reasonable
estimate of the variance$ &e also tried to repeat the experiment in as nearly as
possible identical conditions to reduce 'noise($ &e ordered the pi""a from the same
shop, namely )omino*s +i""a$ To be consistent he ordered a Supreme pi""a each
time at approximately the same time of day$ The response was measured from the
time he closed the telephone to the time the pi""a was delivered to the front door of
his house$ Bill wrote each of the eight treatments on a piece of paper twice, put
them all into a hat, mixed them up, and too them out one at a time to allocate the
order in which each treatment was done$ The three ,ualitative independent
variables !rust -Thin./, Thic.01, !oe -2o./, 3es.01, and Bread -4arlic bread5
2o./, 3es.01 and the response variable )elivery time, are in minutes Analy"e the
data and summari"e your fndings6
/
Applied Statistics Assignment 7 888
SOLUTION
Identifcation of Variables
To start the analysis, the frst step is to come up with the listing of independent and
dependent variables $The following table shows the variables involved in the given
problem5
9ariable 2ame
Type of
9ariable
2ature of
9ariable
:evels of the 9ariable
!rust
8ndependent Qualitative
Thic !rust Thin !rust
!oe
;rdered <ith
+i""a
2ot ;rdered
with +i""a
4arlic Bread
;rdered <ith
+i""a
2ot ;rdered
<ith +i""a
)elivery time )ependent Quantitative 2$A$
There are total = possible combinations from the above three factors with two
repetitions for each treatment$
0
Applied Statistics Assignment 7 888
Visualization of Data
Scatter +lot
Box +lot
Obserations fro! Bo" #lot and Scatter Plot$
;rder with thic crust and coe without garlic bread taes longer than all
other treatments
The treatment with thin crust and coe along with garlic bread taes the
least delivery time
All remaining treatment di#er very slightly from one another
Model for %nal&sis
2ext, we shall analy"e whether the mentioned and other remaining treatments
di#er signifcantly and how the each factor a#ects delivery time$ Since the design of
the experiment corresponds to completely randomi"ed design, the analysis can be
started by taing the model as below5
Y
ijkl
= +
i
+
j
+
k
+ ()
ij
+ ()
ki
+ ()
jk
+()
ijk
+
ikj
;
where 3i% . ;bserved value,
> . ;verall mean,
?i . @ain e#ect of crust
A% . @ain e#ect of coe
k =
@ain e#ect of bread
()ij
=
B#ect of interaction between crust and coe
()ki =
B#ect of interaction between bread and coe
()jk =
B#ect of interaction between coe and bread
()ijk =
B#ect of interaction between crust, coe and bread
ijkl . Cesiduals, which is i$i$d$ D2-/,E
F
1
%nal&sis of Variance '%NOV%($
F
Applied Statistics Assignment 7 888
Girst it is to be checed whether the source of variation in the data set is due to
Treatment or due to chance alone5
Analysis of 9ariance Table
Source
)egree ;f
Greedom
Sum
S,uares
@ean
S,uare
G 7 9alue +7 9alue
Treatment H I=$JK= L$JJ00 I$IHIK /$/FM=L
Cesiduals = 0F$M 0$MLFM
Inference$ Since the p value is only /$/FM=L , it is not due to chance that we
observe a variation in the data set $ Thus treatment has an e#ect on the delivery
time of the pi""a$
2ext the source of variation in the dataset for di#erent factors are analy"ed
using the model Y
ijkl
= +
i
+
j
+
k
+ ()
ij
+ ()
ki
+ ()
jk
+
()
ijk
+
ikj
and the following results were obtained5
Analysis of 9ariance Table
Source
)egree ;f
Greedom
Sum
S,uares
@ean
S,uare
G 7
9alue
+7 9alue
)rust 0 0=$/LFM 0=$/LFM 00$ML
*+**,-
.
!oe 0 /$MLFM /$MLFM /$KL /$MLM00
Bread 0 0=$/LFM 0=$/LFM 00$ML
*+**,-
.
)rust$)o/e 0 0/$MLFM 0/$MLFM L$HL
*+*-0.
1
!rust5Bread 0 /$/LFM /$/LFM /$/I /$=ILIH
!oe5Bread 0 0$MLFM 0$MLFM 0$// /$KILMJ
!rust5!oe5Bread 0 /$/LFM /$/LFM /$/I /$=ILIH
Cesidual = 0F$M/// 0$MLFM
Inference$
@ain e#ect of !rust is signifcant
@ain e#ect of Bread is signifcant
@ain e#ect of coe is insignifcant however two way interaction of !rust with
!oe is signifcant
Two way interactions involving bread are also insignifcant
K
Applied Statistics Assignment 7 888
Three way interaction is insignifcant
Thus, the model assumed has to be refned so that the factors with insignifcant
e#ects can be neglected$ Thus the refned model becomes5
Y
ijkl
= +
i
+
j
+
k
+ ()
ij


+
ikj
;
Note$ %lt2ou32 t2e !ain e4ect of co/e is insi3nifcant but due to 5ierarc2&
Princi#le 6e cannot eli!inate it fro! t2e !odel+
%nal&sis of Variance '%NOV%( for Refned Model $
The source of variation in the dataset analy"ed using the refned model is as
follows5
Analysis of 9ariance Table
Source
)egree ;f
Greedom
Sum
S,uares
@ean
S,uare
G 7 9alue +7 9alue
)rust 0 0=$/LFM 0=$/LFM 0I$//II *+**-17-
!oe 0 /$MLFM /$MLFM /$IKL0 /$MFFM==
Bread 0 0=$/LFM 0=$/LFM 0I$//II *+**-17-
)rust$)o/e 0 0/$MLFM 0/$MLFM =$0=JI *+*078.,
Cesidual 00 0I$0=HM 0$F=J=
Inference$
@ain e#ect of !rust is signifcant -as before1
@ain e#ect of Bread is signifcant -as before1
)learl&9 t2ere is a t6o 6a& interaction bet6een )rust and )o/e and
an& conclusion on t2e e4ect of co/e : bread on delier& ti!e can
onl& be studied b& anal&zin3 t2eir interaction #lots
Validation of Underl&in3 %ssu!#tions
I
Applied Statistics Assignment 7 888
The following are the assumptions 5
2ormality of the residuals
&omoscedasticity of the residuals with respect to each factor
Residuals Vs ;itted alue and Nor!alized < = < Plot for Residuals$
;or!al Test for Nor!alit&$
@ethod + N 9alue
Shapiro7<il normality test /$KL/HL0K
Anderson7)arling normality test /$IH0FIL=
!ramer7von @ises normality test /$M/HJLK/
:illiefors -Oolmogorov7Smirnov1 normality test /$L/MKJ0L
Shapiro7Grancia normality test /$MM//IH0
Inference$
M
Applied Statistics Assignment 7 888
The residuals 9s ftted values are randomly distributed without any pattern,
thus proving model is indeed correct
All the tests as well as the Q7Q plot of standardi"ed residuals shows that they
are indeed normally distributed
Test ;or 5o!oscedasticit&$
&omoscedasticity of residuals is checed using Bartlett*s test$ The below are the
results of the same on each factor5
;or )rust$ BartlettPs O7s,uared . /$=F/J, df . 0, p7value . /$KLIJ
;or )o/e$ BartlettPs O7s,uared . /$FFHL, df . 0, p7value . /$LKKK
;or Bread$ BartlettPs O7s,uared . /$F/L0, df . 0, p7value . /$LIJJ
Thus it can be inferred from a high p value that its by chance only that we are
seeing a variation in deviation in the dataset and our null hypothesis of
homoscedasticity of the residuals cannot be re%ected$
Multi#le )o!#arison $
2ow, the e#ect of di#erent levels of the factors on delivery time are studied by
multiple comparison using Tuey*s &S) method for the complete model$
Tu/e& !ulti#le co!#arisons of !eans
,7> fa!il&?6ise confdence leel
;it$ ao'Delier& Ti!e @ )rust A )o/e B Bread(
Sl no Comparison
Diferenc
e
Lower Upper P-adj
0
T2ic/ )rust =
T2in )rust
1+017
*+CD70,
*C
-+-D8C*, *+**-17-7
F
<ith !oe N
<ithout !oe
7/$KHM
7
0$LFI=/J
/$=HI=/JF /$MFFM==K
-
Eit2 Farlic
Bread = Eit2out
Farlic Bread
?1+017
?
-+-D8C*
,
?
*+CD70,*
C
*+**-17-7
I
Thic !rust
<ithout !oe N
Thin !rust <ithout
!oe
/$M/
7
0$J0L=00
J
F$J0L=00=
=
/$JFFLH/I
M
Thin !rust <ith
!oe N Thin !rust
<ithout !oe
7F$//
7
I$I0L=00
J
/$I0L=00=
=
/$00LLKJI
L Thic !rust <ith
!oe N Thin !rust
0$HM 7
/$LLL=00
I$0LL=00=
=
/$0==HJL/
L
Applied Statistics Assignment 7 888
<ithout !oe J
D
T2in )rust Eit2
)o/e = T2ic/
)rust Eit2out
)o/e
?1+7*
?
8+,0.C0
0,
?
*+*C-0CC
01
*+*81*D7-
=
Thic !rust <ith
!oe N Thic !rust
<ithout !oe
0$FM
7
0$0LL=00
J
K$LLL=00=
=
/$IKJLJFK
,
T2ic/ )rust Eit2
)o/e = T2in
)rust Eit2 )o/e
-+D7
0+---0C
C0
.+0..C00
CC
*+**-187-
Inference$
The following combinations have signifcant e#ect on the delivery time of the pi""a
T2in crust ta/es less delier& ti!e t2an t2ic/ crust 'een 6it2 co/e(
T2in crust 6it2 co/e ta/es less ti!e t2ic/ crust 6it2out co/e
Eit2 3arlic bread delier& ti!e is !ore t2an 6it2out 3arlic bread 'No
interaction 6it2 co/e and crust(
Interaction Plots$
Interaction #lot bet6een )rust and )o/e$ Grom the A2;9A table we can clearly
see that the two factors N coe and crust interact, hence we plot their interaction$
H
Applied Statistics Assignment 7 888
)onclusions$
o Statistical eidence su33est t2at t2in crust #izzas 62en
ordered 6it2 co/e do 2ae a si3nifcantl& lo6er delier& ti!e
co!#ared to t2ic/ crust ones ordered 6it2 or 6it2out co/e
'refer Si No D G , of Tu/e&5SD co!#arison table aboe(
E4ect of Farlic Bread$ As mentioned before, garlic bread has statistically
signifcant e#ect on delivery time$ But to understand its e#ects, lets plot K
way interaction diagram5
=
Applied Statistics Assignment 7 888
&ere, we can interpret the Tuey*s &S) result of e#ect of garlic bread by comparing
means when it is ordered as against when it is not ordered N both are statistically
di#erent$ The same can also be observed by a simple box plot5
)onclusions$
o If 3arlic bread is ordered t2en t2e delier& ti!e is reduced+
;inal Su!!ar&:
Grom Bill Afantenou*s experimental data, statistically, we can have following
inferences5
The delivery time gets reduced on ordering garlic bread as compared to the
case when it is not ordered$
The delivery time gets reduced on ordering thin crust pi""a as compared to
thic crust one$
The e#ect of coe can*t be stated independently because of its anti N
synergistic interaction with the type of crust$
Between the eight treatment groups, the order comprising of t2in crust 6it2
co/e and 3arlic bread taes signifcantly lesser time then t2ic/ crust 6it2
co/e and no 3arlic bread, the exact intuition as observed from the box plot
initially$
J
Applied Statistics Assignment 7 888

Вам также может понравиться