Sei sulla pagina 1di 8

Individual Homework #5

Design of Experiment and Analysis


3.3
Source

DF

SS

MS

Factor

36.15

12.05

Error

16

159.89

9.99

Total

19

196.04

P
1.206 <0.01

3.6
sham=c(4.51, 7.95, 4.97, 3.00, 7.97, 2.23, 3.95, 5.64, 9.35, 6.52, 4.96, 6.10, 7.19, 4.03, 2.72, 9.19, 5.17, 5.70, 5.85, 6.45)
pmf1=c(5.32, 6.00, 5.12, 7.08, 5.48, 6.52, 4.09, 6.28, 7.77, 5.68, 8.47, 4.58, 4.11, 5.72, 5.91, 6.89, 6.99, 4.98, 9.94, 6.38)
pmf2=c(4.73, 5.81, 5.69, 3.86, 4.06, 6.56, 8.34, 3.01, 6.71, 6.51, 1.70, 5.89, 6.55, 5.34, 5.88, 7.50, 3.28, 5.38, 7.30, 5.46)
pmf3=c(7.03, 4.65, 6.65, 5.49, 6.98, 4.85, 7.26, 5.92, 5.58, 7.91, 4.90, 4.54, 8.18, 5.42, 6.03, 7.04, 5.17, 7.60, 7.90, 7.91)

> y = c(sham, pmf1, pmf2, pmf3)


> n = rep(20, 4)
>n
[1] 20 20 20 20
> group = rep(1:4, n)
> group
111111111111111111112222222222222222222233333333333333333
33344444444444444444444
> data = data.frame(y = y, group = factor(group))
> fit = lm(y ~ group, data)
> anova(fit)
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq F value Pr(>F)
group

3 10.044 3.3478 1.2979 0.2813

Residuals 76 196.030 2.5793


a) Based on p-value of 0.2813 we can conclude that PEMF usages does not affect BMD.

b)
res.resid = resid(res.lm)
summary(res.lm)
Call:
lm(formula = y ~ group, data = data)

Residuals:
Min

1Q Median

3Q

Max

-3.7780 -1.0748 0.0048 0.9439 3.7745


Based on the Normal Q-Q plot residuals appear to be normally distributed. According to
standardized residuals plot no pattern is noticed meaning that residuals are structureless. Residual
vs fitted also shows no pattern with residuals randomly distributed above and below of the zero (0)
line.

3.7.
MT1=c(3129, 3000, 2865, 2890)
> MT2=c(3200, 3300, 2975, 3150)
> MT3=c(2800, 2900, 2985, 3050)
> MT4=c(2600, 2700, 2600, 2765)
> y1 = c(MT1, MT2, MT3, MT4)

> n = rep(4, 4)
>n
[1] 4 4 4 4
> group = rep(1:4, n)
> group
[1] 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4
> data = data.frame(y = y1, group = factor(group))
> fit = lm(y1 ~ group, data)
> anova(fit)
Analysis of Variance Table
Response: y1
Df Sum Sq Mean Sq F value
group

3 489740 163247

Residuals 12 153908

Pr(>F)

12.728 0.0004887 ***

12826

--Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1


a) Null hypothesis rejected. Mixing technique affect the strength of the cement at =0.05
b)

The mean values for MT1, MT2, MT3 and MT4 are well spread apart which graphically allows
us to see that the values are drawn from different distributions.
c)
lsd.comp <- read.csv(file="lsd.csv",head=TRUE,sep=",")
> lsd.comp
TRT TS
1 MT1 3129
2 MT1 3000
3 MT1 2865
4 MT1 2890
5 MT2 3200
6 MT2 3300
7 MT2 2975
8 MT2 3150
9 MT3 2800
10 MT3 2900
11 MT3 2985
12 MT3 3050
13 MT4 2600
14 MT4 2700
15 MT4 2600

16 MT4 2765
LSD.test(lsd.comp$TS,lsd.comp$TRT,12,12826 )
Study:
LSD t Test for lsd.comp$TS
Mean Square Error: 12826
lsd.comp$TRT, means and individual ( 95 %) CI
lsd.comp.TS std.err

LCL

UCL

Min. Max.

MT1

2971.00

60.27852 4

2839.664 3102.336 2865 3129

MT2

3156.25

67.98820 4

3008.116 3304.384 2975 3300

MT3

2933.75

54.13621 4

2815.797 3051.703 2800 3050

MT4

2666.25

40.48534 4

2578.040 2754.460 2600 2765

alpha: 0.05 ; Df Error: 12


Critical Value of t: 2.178813
Least Significant Difference 174.482
Means with the same letter are not significantly different.
Groups, Treatments and means
a

MT2

3156

MT1

2971

MT3

2934

MT4

2666

d) Residuals appear to be normally distributed and have a constant variance.

e) Residuals are randomly distributed above and below zero(0) according to tensile strength and so
no bias is seen on residuals.

f)

Potrebbero piacerti anche