{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Stat3022 hw2 Yutong Gao

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

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

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 95 percent confidence interval: 1.277603 7.010803 sample estimates: mean of x mean of y 19.88333 15.73913

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

View Full Document
Conclusion: according to the results based on R, it has verified the statements made in the summary of statistical findings for the motivation and creativity data: two-sided pvalue = .005 and
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern