hw3 Rquestions

hw3 Rquestions - -8.563158 13.753125 3.28 i) >

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
2.23 > dat<-read.csv("http://www.stat.umn.edu/~graalum/data/ch2/ex0223.csv",header=T) > names(dat) [1] "STATE" "INCREASe" "FATALITIESCHANGE" > head(dat) STATE INCREASe FATALITIESCHANGE 1 Alaska No -29.0 2 Connecticut No -4.4 3 Dist. of Columbia No -80.0 4 Hawaii No -25.0 5 Indiana No -13.2 6 Kentucky No 3.4 > attach(dat) > t.test(FATALITIESCHANGE~INCREASe,alternative='less',var.equal=TRUE) Two Sample t-test data: FATALITIESCHANGE by INCREASe t = -3.0435, df = 49, p-value = 0.001877 alternative hypothesis: true difference in means is less than 0 95 percent confidence interval: -Inf -10.02313 sample estimates: mean in group No mean in group Yes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -8.563158 13.753125 3.28 i) &gt; data&lt;-read.csv(&quot;http://www.stat.umn.edu/~graalum/data/ch3/ex0328.csv&quot;,header=T) &gt; attach(data) &gt; boxplot(REMOVED~BEE,ylab=&quot;REMOVED&quot;,xlab=&quot;BEE&quot;,data=data) &gt; &gt; data$logX&lt;-with(data,log((REMOVED)/(1-REMOVED))) &gt; boxplot(logX~BEE,ylab=&quot;logX&quot;,xlab=&quot;BEE&quot;,data=data) iii) &gt; t.test(data$logX,alternative='two.sided',mu=0.0,conf.level=.95) One Sample t-test data: data$logX t = -0.5939, df = 46, p-value = 0.5555 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval:-0.3866656 0.2104695 sample estimates: mean of x -0.08809807...
View Full Document

Page1 / 3

hw3 Rquestions - -8.563158 13.753125 3.28 i) &amp;amp;gt;

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online