Unformatted text preview:

1. (6.16)Let contrast C = [~-I000~ } .We test the hypothesis0-1s=H Ha :C,u#O.1,1749.533,1509.133,1723.3) and.87289.71 94110.21, 76137.10 80777.35, 91917.09 90171.58; 90171.58 103766.36= n(CX)'(CS-1C')-l(CX) = 253.7966and theHo: C,u = 0By Splus, we can calculate that ,u' = (1906.-,~105616.30 94613.5394613.53 101510.1287289.71 76137.1094110.21 80777.35Then we can calculate the statistic T 2critical value (n-1)(q-1)Fq-ln-q+l(a) =9.53891< 253.7966. So we can reject the null(n-q+1) .vhypothesis, i.e., the four measures are not equal. Let a' = (0.5,0.5,-0.5,-0.5) , we canconstruct the 95% simultaneous confidence interval for a contract in the mean levelsrepresenting a comparison of the dynamic measurements with the static measurements,that isi.e. [124.3569,298.8431]0.02491758-0.019631590.02493980-0.026405630.020384020.024917580.020384020.016558420.01963159and Sl ='Ul =2. (6.17)(a) We use the logarithmic transformation for the data. First we calculate the mean andcovariance matrix for the two samples.[4.900659] r 4.6219283.940286 L[4.725444) l O.011072004 0.008019142 O.OO~15Y64~-.4.477574 and S2 = 0.008019142 0.006416726 0.0060052713.703186 0.008159648 0.006005271 0.006772758We can find that the covariance matrices are not quite different, so we can assume thatLI = L2 .We test the hypothesisHo : II I = 112 H H : , .r r " ~ ..~'U2 ='u, * .ll".. 1 1 (n1 + n2 -2) p( 8cntlca va ueF p.n1+n2-p-1 a) = .833461 < 85.34112. So we reject the nulln +n -p -11 2hypothesis, i.e., the two population mean vectors are not equal.(b) The hypothesis in part (a) is rejected. The linear combination of mean componentsmost responsible for rejecting H o is-1 --aoc Spool(X1-X2)=( c) The simultaneous confidence intervals for l' (}/I -}/2) is,- -~ 1 11 (XI -X2):tc 1 (-+-)Spool1nl n2We can choose l' = (1,0,0), (0,1,0), (0,0,1) , so the simultaneous confidence intervals for thecomponent mean are respectively[0.05776762, 0.2926638][0.05239685,0.2363126]~~ [0.1290622,0.3451377]The corresponding Bonferroni intervals are respectively[0.07702893, 0.2734025][0.06747781,0.2212316][0.1467803,0.3274197]We can find that Bonferroniin this situation.3. (6.22)For the modelx ij = .u + Ti + elj ,with constraint: Lf=l ni Ti = 0, we want to test the hypothesisH o : Ti = T2 = T3 = 0 H H a :not all ofthem equal to 0We ca~ construct the one-way MANOV A table as the followi~g -Source of Variation Sum of Squares De~ee gf FreedomTreatment (Species) 7877.333 -2288.933 9 -I = 2-2288.933 1151.853658.86 479.02]479.02 1697.228536.193 -1809.913-1809.913 2849.073n-g=147Residualn-l=149TotalFrom the output of S-plus,Df Pillai Trace approx. F num df den df P-valueSpecies 2 1.14 97.4238 4 294 OResiduals 147We can find that we should reject the null hypothesis, that is, the means of the threespecies are not equal to each other. We can calculate the 95% simultaneous confidenceintervals for all Dair of difference isAbout the assumption ~1 = ~2 = ~3 ' we calculate s~ /si7 .We can find that theassumption seems not supported by our calculation, because ~f the ratio are greaterthan 4 or less than 0.25./* S-plus program for 6.16. */stiff <- read.table("h:\\stat524\\stiffness.data")ic <- cbind(rep(l, 3), diag(rep(-l, 3)mu <- apply(stiff, 2, mean) ;S <- var(stiff);n <- dim{stiff) [1] ;q <- dim{stiff) [2] ;T2 <- n * t(C %*% mu) %*% solve(C %*% S %*% t(C))fcrit <- (n-l)*(q-l)/(n-q+l)*qf(O.95, q-l, n-q+l);%*% c %*% mu;t(a) %*% s %*% a / n)t(a) %*% s %*% a / n) ;a <- c(0.5, 0.5, -0.5, -0.5) ;CI.low <- t(a) %*% mu -sqrt(fcrit *cr.up <- t(a) %*% mu + sqrt(fcrit */* S-plus program for 6.17. * /carapace <- read.table('h:\\stat524\\carapace.data', header=T)female <- log{carapace[1:24, 2:4])female.mu <- apply {female, 2, mean)female.S <- var{female)n1 <- dim{ female) [1]male <- log(carapace[25:48, 2:4])male.mu <- apply (male, 2, mean)male.S <- var(male)n2 <- dim(male) [1]p <- dim( female) [2 ]S.pool <- {{nl-l)*female.S+{n2-1)*male.S)/{nl+n2-2)T2 <- t{female.mu-male.mu)%*%solve{{1/nl+l/n2)*S.pool)%*%{female.mu-male.mu)fcrit <- {nl+n2-2)*p/{nl+n2-p-l)*qf{O.95, p, nl+n2-p-l)alpha <- solve(S.pool)%*%(female.mu-male.mu)a <- diag(rep(l, 3)for(i in 1:3){diff <- t(a[ ti]) %*% (female.mu-male.mu)limit <- sqrt(fcrit*(1/nl+l/n2)*t(a[ ti])%*%S.pool%*%aprint(exp(diff-limit»print(exp(diff+limit»ibon.limit <- qt(1-0.05/6, nl+n2-2)*sqrt((1/nl+l/n2)*t(a[i])%*%S.pool%*%a[,i])print(exp(diff-bon.limit)print(exp(diff+bon.limit)/* Splus program for 6.22. */iris <- read.table(lh:\\stat524\\iris.data', heade=T)attach(iris)iris.manova <- man ova (cbind(Petalwidth, Sepalwidth)-Species, data=iris)iris. summary <- summary(iris.manova)samplel <- cbind(iris$Petalwidth[iris$No==l],iris$Sepalwidth[iris$No==l])sample2 <- cbind(iris$Petalwidth[iris$No==2],iris$Sepalwidth[iris$No==2])sample3 <- cbind(iris$Petalwidth[iris$No==3],iris$Sepalwidth[iris$No==3])mul <- apply (samplel, 2, mean)mu2 <- apply(sample2, 2, mean)mu3 <- apply(sample3, 2, mean)w <- iris.summary$SS$Residualsbon <- qt(1-0.05/12,


View Full Document

Purdue STAT 52400 - Study Guide

Documents in this Course
Load more
Download Study Guide
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Guide and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Guide 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?