Homework 10 Solution - Statistical Methods for Bioscience I | STAT 571, Assignments of Data Analysis & Statistical Methods

Material Type: Assignment; Class: Statistical Methods for Bioscience I; Subject: STATISTICS; University: University of Wisconsin - Madison; Term: Fall 2003;

Typology: Assignments

Pre 2010

Uploaded on 09/02/2009

koofers-user-bm2
koofers-user-bm2 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Stat 571 Homework Solution #10 Fall, 2003
1. ANALYSIS OF VARIANCE
SOURCE DF SS MS
TREATMENT 3 5530 1843
ERROR 8 2679 335
TOTAL 11 8209
2. (a) > sheer=read.table("http://www.stat.wisc.edu/~st571-1/data/sheer.dat",
+ col.names=c("type","strength"))
> tapply(sheer$strength, sheer$type, stem, scale=2)
45 | 8
46 | 38
47 | 39
48 |
49 | 9
50 | 4
51 | 7
45 | 5
46 |
46 | 6
47 |
47 | 6
48 | 34
48 |
49 | 23
49 | 8
48 | 3
49 |
50 | 0029
51 | 9
52 | 8
53 | 8
49 | 5
50 |
51 | 13
52 | 0
53 | 3
54 | 03
55 |
56 | 2
1
pf3
pf4
pf5

Partial preview of the text

Download Homework 10 Solution - Statistical Methods for Bioscience I | STAT 571 and more Assignments Data Analysis & Statistical Methods in PDF only on Docsity!

1. ANALYSIS OF VARIANCE

SOURCE DF SS MS

TREATMENT 3 5530 1843

ERROR 8 2679 335

TOTAL 11 8209

  1. (a) > sheer=read.table("http://www.stat.wisc.edu/~st571-1/data/sheer.dat",
    • col.names=c("type","strength"))

    tapply(sheer$strength, sheer$type, stem, scale=2)

45 | 8 46 | 38 47 | 39 48 | 49 | 9 50 | 4 51 | 7

45 | 5 46 | 46 | 6 47 | 47 | 6 48 | 34 48 | 49 | 23 49 | 8

48 | 3 49 | 50 | 0029 51 | 9 52 | 8 53 | 8

49 | 5 50 | 51 | 13 52 | 0 53 | 3 54 | 03 55 | 56 | 2

(b) > sheer.lm=lm(strength~type,sheer)

anova(sheer.lm)

Analysis of Variance Table Response: strength Df Sum Sq Mean Sq F value Pr(>F) type 4 12227.9 3057.0 9.1994 3.451e-05 *** Residuals 35 11630.5 332. Total 39 23858. (c) Xij = μi + eij where eij ∼ N (0, σ^2 ) i = 1, 2 , ..., 5,j = 1, 2 , ...8. Xij is the jth^ measurement in the ith^ glue type. μi is the mean measurement of the ith^ glue type.

(d) Hypotheses H 0 : μ 1 = μ 2 = ... = μk HA :not all μi are equal

F = 9. 1994

P-value = Pr(F 4 , 35 ≥ 9 .1994) = 0. 000

(e) 99% C.I. for μ 1 − 14 (μ 2 + μ 3 + μ 4 + μ 5 ) λ = (1, − 1 / 4 , − 1 / 4 , − 1 / 4 , − 1 /4)

∑^ k i=

λi X¯i. ± t(N −k, α 2 )

MSErr

√√ ∑k i=

λ^2 i ni^ =^ −^23.^3475 ±^ t^35 ,^0.^005 ×^18.^23 ×^0.^3952847 = − 23. 3475 ± 19. 62785 = [− 42. 97535 , − 3 .71965]

X¯i. can be obtained by

tapply(sheer$strength,sheer$type, mean) A B C D E 482.625 480.875 509.875 527.125 506.

New experimental glues appear to have stronger dry sheer strength than the “standard” glue.

(d) Test for H 0 : σ^21 = · · · = σ 32 Use Levene’s Test: medians: 22.5 18.9 17.

abs deviances: gp1(13): 4.0 1.5 1.0 3.7 0.0 1.5 1.0 2.3 2.0 2.0 3.0 0.0 1. gp2(8) : 0.1 0.9 2.4 0.6 0.6 0. gp3(11): 2.5 1.1 3.0 0.5 0.9 2.5 1.1 0.6 0.0 1.4 0.

delete exactly one zero from gp 1(13obs) and gp3(11obs) gp1(12): 4.0 1.5 1.0 3.7 1.5 1.0 2.3 2.0 2.0 3.0 0.0 1. gp2(8) : 0.1 0.9 2.4 0.6 0.6 0. gp3(10): 2.5 1.1 3.0 0.5 0.9 2.5 1.1 0.6 1.4 0.

ANOVA table for the data above SOURCE DF SS MS F p TREATMENT 2 5.28 2.64 2.44 0. ERROR 25 27.09 1. TOTAL 27 32. P-value is 0.108, which is not strongly against the homogeneity of variances. (e) 99% C.I. for σ^2 : [ (N^ χ− 2 k)MSErr (N −k, α 2 )

, (N χ^2 −^ k)MSErr (N −k, 1 − α 2 )

] = [ χ^272 ×^3.^45 (27, 0 .005)

, (^) χ^272 ×^3.^45 (27, 0 .995)

]

= [93. 15 / 49. 64 , 93. 15 / 11 .81]

= [1. 877 , 7 .887]

  1. (a) > y=c(12.4,15.7,10.1,11.7,12.8,
    • 14.5,11.4,18.9,16.3,13.8,
    • 14.2,18.0,20.5,15.1,18.5,
    • 22.1,17.4,20.6,19.0,19.1,
    • 26.1,19.7,23.1,21.0,24.2,
    • 22.8,27.1,26.2,19.8,25.3)

    n=rep(5,6) group=rep(1:6,n) data=data.frame(weight=y,group=factor(group)) fit=lm(weight~group,data) anova(fit)

Analysis of Variance Table Response: weight Df Sum Sq Mean Sq F value Pr(>F) group 5 511.60 102.32 16.559 4.248e-07 *** Residuals 24 148.30 6. Total 29 659.

F = 16. 56

P-value = Pr(F 5 , 24 ≥ 16 .56) = 0. 000 Very strong evidence against the claim that the amount of nitrogen does not affect the weight of corn. (b) From the plot it appears that the relationship between weight and units of N follow a linear trend: weight increases as units of N increase. (c) Test for hypotheses: H 0 : − 5 μ 1 − 3 μ 2 − 1 μ 3 + 1μ 4 + 3μ 5 + 5μ 6 = 0 vs HA : − 5 μ 1 − 3 μ 2 − 1 μ 3 + 1μ 4 + 3μ 5 + 5μ 6 6 = 0 λ = (− 5 , − 3 , − 1 , 1 , 3 , 5) Test statistic

T =

∑k √ i=1^ λi^ X¯i MSErr

k i=

λ^2 i ni = √^84.^4

  1. 18 × 3. 741657 = 9. 073696

P-value = 2 Pr(T 24 ≥ 9 .073696) = 0. 0000

Very strong evidence againt H 0 , indicating the linear trend is present.

  1. a. > cocoon=read.table("http://www.stat.wisc.edu/~st571-1/data/cocoon.dat",
    • col.names=c("race","length"))

    cocoon.lm=lm(length~race,cocoon) anova(cocoon.lm)

Analysis of Variance Table Response: length Df Sum Sq Mean Sq F value Pr(>F) race 6 288.571 48.095 10.569 4.327e-08 *** Residuals 63 286.700 4. Total 69 575. k = 7, ni = n = 10, N = 70 H 0 : μA = μB = μC = μD = μE = μF = μG HA: not all the means are equal With F = (^) M SErrM ST rt = (^484) .. 551095 = 10.569, we get P − value = P (F 6 , 63 > 10 .569) = .000. There’s very strong evidence that there’s some difference among the seven races. b. Assumptions: independent samples from seven normal population with equal variances. To verify the normality, we can make stem-and-leaf plots or normal score plots for each group(seperately).