Stat3022 hw2 Yutong Gao

Stat3022 hw2 Yutong Gao - Stat3022 hw2 Yutong Gao 2.14 >...

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

View Full Document Right Arrow Icon
Stat3022 hw2 Yutong Gao 2.14 > dat <- read.csv("http://www.stat.umn.edu/~graalum/data/ch1/ex0112.csv",header=T) > attach(dat) > names(dat) [1] "BP" "DIET" > fish<-BP[DIET=="fishoil"] > reg<-BP[DIET=="regularoil"] > t.test(fish,reg,varequal=F) Welch Two Sample t-test data: fish and reg t = 3.0621, df = 9.264, p-value = 0.01308 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 2.039893 13.388678 sample estimates: mean of x mean of y 6.571429 -1.142857 Conclusion: the 95%CI is (2.039893, 13.388678) and the two-sided p-value is 0.01308 so that one-sided p-value is 0.00654. 2.16 > dat <- read.csv("http://www.stat.umn.edu/~graalum/data/ch1/case0101.csv",header=T) > attach dat > names(dat) [1] "SCORE" "TREATMENT" > int<-SCORE[TREATMENT=="INTRINSIC"] > ext<-SCORE[TREATMENT=="EXTRINSIC"] > t.test(int,ext,varequal=F) Welch Two Sample t-test data: int and ext t = 2.9153, df = 43.108, p-value = 0.005618 alternative hypothesis: true difference in means is not equal to 0
Background image of page 1

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

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

This note was uploaded on 02/28/2012 for the course ECON 111 taught by Professor Aaa during the Summer '11 term at UIBE.

Page1 / 7

Stat3022 hw2 Yutong Gao - Stat3022 hw2 Yutong Gao 2.14 >...

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

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