Sie sind auf Seite 1von 4

Hector Will Pinto

STAT 512 006 (TR 3:00 – 4:15 pm)

Homework 7

1. A. The estimated value of 𝜇 is


16.4 ∗ 7 + 24.1 ∗ 5 + 15.2 ∗ 8 + 9.8 ∗ 4
𝜇= = 16.504
7+5+8+4
b.

𝜇 16.504

Treatment ni Yi si (yi- 𝜇)^2


1 7 16.4 11.3 0.010816
2 5 24.1 10.6 57.69922
3 8 15.2 9.5 1.700416
4 4 9.8 10.1 44.94362
Sum 104.3541
104.3541
𝜎2 = = 5.218
24 − 4
c. The within-group sample variances are treated as “data” about the value of the true error
variance, σ 2 , which is estimated by taking a weighted average.

d. Tau1,2,3 in yellow

(yi-
Treatment ni Yi si mu)^2 tau ni/n4 Yhat
1 7 16.4 11.3 0.010816 1.75
2 5 24.1 10.6 57.69922 7.596 1.25
3 8 15.2 9.5 1.700416 -1.304 2
4 4 9.8 10.1 44.94362 -6.704 1 18.249
Yhat 4 = 18.249

e. ANOVA table

Source df SS MS F
model 3 481.9496 160.6499 30.78938
error 20 104.3541 5.217703
total 23 586.3036 25.49146
p-value = 1-prob(30.789,4,24)=1-0.99999999996= 0.0000000001

f. It would not change, because the value of n changes in each treatment, so the individual s is not taken
into consideration.

g. The F value would increase and p value decrease because the population increases, so it is related to
the way MSE is calculated.
2. A. mean table
3. The MEANS Procedure
Analysis Variable : time
fa fb N Obs N Mean Std Dev Minimum Maximum
1 1 5 5 59.8000000 7.8549348 48.0000000 69.0000000
2 5 5 47.8000000 7.4632433 39.0000000 57.0000000
3 5 5 58.4000000 8.5322916 47.0000000 67.0000000
2 1 5 5 48.4000000 6.7675697 39.0000000 57.0000000
2 5 5 61.2000000 7.3280284 51.0000000 70.0000000
3 5 5 56.2000000 8.0436310 49.0000000 69.0000000
3 1 5 5 60.2000000 7.3280284 52.0000000 70.0000000
2 5 5 60.8000000 6.3007936 53.0000000 70.0000000
3 5 5 49.6000000 4.5055521 44.0000000 56.0000000

b. 𝜇𝑖,𝑗 = 𝜇 + 𝛼𝑖 + 𝛽𝑗 + (𝛼𝛽)𝑖𝑗

c. Table

A B Symbolic SAS name Yi


1 1 mu+alpha1+beta1+(alpha*beta)11 Int+A1+B1+(A*B)11 59.8
1 2 mu+alpha1+beta2+(alpha*beta)12 Int+A1+B2+(A*B)12 47.8
1 3 mu+alpha1+beta3+(alpha*beta)13 Int+A1+B3+(A*B)13 58.4
2 1 mu+alpha2+beta1+(alpha*beta)21 Int+A2+B1+(A*B)21 48.4
2 2 mu+alpha2+beta2+(alpha*beta)22 Int+A2+B2+(A*B)22 61.2
2 3 mu+alpha2+beta3+(alpha*beta)23 Int+A2+B3+(A*B)23 56.2
3 1 mu+alpha3+beta1+(alpha*beta)31 Int+A3+B1+(A*B)31 60.2
3 2 mu+alpha3+beta2+(alpha*beta)32 Int+A3+B2+(A*B)32 60.8
3 3 mu+alpha3+beta3+(alpha*beta)33 Int+A3+B3+(A*B)33 49.6

d. time grand mean = 55.8222

e. The factor effect model is 𝑌𝑖,𝑗 = 𝜇 + 𝜏𝑖 + 𝜖𝑖,𝑗


𝐻𝑜: 𝜏1 = 𝜏2 = 𝜏3 = 𝜏4 = 𝜏5 = 𝜏6 = 0
𝐻a: 𝜏1 ≠ 𝜏2 ≠ 𝜏3 ≠ 𝜏4 ≠ 𝜏5 ≠ 𝜏6 ≠ 0
The F value is 0.17, df: 4,40, p-value= 0.9519. There is not enough evidence to conlude thart the
factors have effect in the time.
h.

i. No assumptions violated. They can’t be trusted, there is a contradiction between


assumptions and p value in 2e

SAS Code
data cs;
infile'C:\Users\Emilio Will\Downloads\CH19PR16.DAT';
input time fa fb;
proc print data=cs;
run;
proc glm data=cs ;
class fa fb;
model time = fa fb fa*fb/solution;
means fa fb fa*fb;
run;

proc means data=cs n mean stddev min max;


class fa fb;
var time;
run;
proc sgplot data=cs;
title "Cell means from the means statement/ Hector Will";
scatter x=time y=fa/group=fb groupdisplay=cluster clusterwidth=0.1

markerattrs=(symbol=circlefilled);
series x=time y=fa/group=fb groupdisplay=cluster clusterwidth=0.1;
xaxis label="Factor A" labelattrs=(size=12);
yaxis label="Time" labelattrs=(size=12);
run;

Das könnte Ihnen auch gefallen