This preview shows pages 1–22. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: TwoSample Hypothesis Equal and Unequal Variances (D&B Chp. 10) Difference Between Two Means Data: trout1.txt, trout2.txt & lead.washington.txt EqualScript: Lec12.TwoSampEqV.ssc UnEqualScript: Lec12.TwoSampUnEqV.ssc Brown Trout ( Salmo trutta ) Trout Length at Stocking 1977 Population : trout1 n = 99 mean = 136.5 mm var = 218.9 mm 2 1978 Population : trout2 n = 100 mean = 207.8 mm var = 273.8 mm 2 Is there a difference? Concern that size at stocking will affect survivorship. First we must see if, in fact, they are different in size. 100 150 250 5 10 15 100 150 200 250 0 2 4 6 8 1 2 Length (mm) Trout 1 Trout 2 Histogram Script my.breaks = seq(95,250,by=5) par(mfrow=c(2,1)) par(mar=c(0,4,4,2)) hist(trout1,breaks=my.breaks,cex=1.3) box() par(mar=c(5,4,0,2)) hist(trout2,breaks=my.breaks, xlab="Length (mm)",cex=1.3) box() par(mar=c(5,4,4,2)+.1) 100 150 200 250 1977 1978 Length (mm) n = 99 n = 100 Boxplot Script boxplot(trout1,trout2, names=c("1977","1978"), ylab="Length (mm)") text(45,mean(trout1), paste("n =",length(trout1))) text(90,mean(trout2), paste("n =",length(trout2))) Other Displays of Information plot(c(0,3),c(0,6), type='n',xlab="Examples",ylab="Length") boxes(x=c(1),width=c(0.25), stats=cbind(c(1,2,3,4,5))) points(2,3,pch=15,col=1) lines(c(2,2),c(2,4),lwd=3) Examples Length 0.0 0.5 1.0 1.5 2.0 2.5 3.0 1 2 3 4 5 6 Other Statistics range(trout1) 99.06 175.26 range(trout2) 160.02 246.38 stdev(trout1) 14.79436 stdev(trout2) 16.54675 Year Length (mm) 100 150 200 250 1977 1978 CI Boxes Script plot(c(0,3),c(100,250), axes=F,type='n',ylab="Length (mm)",xlab="Year") axis(side=2) axis(side=1,at=c(1,2),labels=c("1977","1978")) box() boxes(c(1,2),width=0.25, cbind( c(range(trout1)[1], mean(trout1)2*stdev(trout1)/sqrt(length(trout1)), mean(trout1), mean(trout1)+2*stdev(trout1)/sqrt(length(trout1)), range(trout1)[2]), c(range(trout2)[1], mean(trout2)2*stdev(trout2)/sqrt(length(trout2)), mean(trout2), mean(trout2)+2*stdev(trout2)/sqrt(length(trout2)), range(trout2)[2]))) 100 150 200 250 1977 1978 Length (mm) Boxplot with Notch boxplot(trout1,trout2,notch=T, names=c("1977","1978"),ylab="Length (mm)") But is there a difference? 2 1 2 1 : : = A H H Test Statistic 2 1 ) ( 2 1 2 1 x x SE x x z = Difference? 2 1 x x ? ) ( 2 1 = x x V The difference represents a statistic, that under the null hypothesis of no difference should have a mean equal to zero. Variance of sum is sum of the variances. Assumptions to Check If the samples came from populations having normal distributions If the two populations have equal variances Then 2 1 2 1 2 2 2 1 2 2 1 2 1 2 1 + + = + = = SS SS s n s n s s where s x x t p p p x x x x Are they normal populations?...
View Full
Document
 '07
 SULLIVAN,P.

Click to edit the document details