[R] Welch Two Sample T-Test

cosworth201 gap08d at my.fsu.edu
Wed Nov 7 16:27:05 CET 2012


I know when I enter this into R:
> x = c(15, 10, 13, 7, 9, 8, 21, 9, 14, 8)
> y = c(15, 14, 12, 8, 14, 7, 16, 10, 15, 12)
> t.test(x,y,alt="less",var.equal=TRUE)

it shows:

        Two Sample t-test

data:  x and y 
t = -0.5331, df = 18, p-value = 0.3002
alternative hypothesis: true difference in means is less than 0 
95 percent confidence interval:
     -Inf 2.027436 
sample estimates:
mean of x mean of y 
     11.4      12.3 


I need to write out the entire function and give this same result but
without t.test(x,y,alt="less",var.equal=TRUE). I need to print out the value
for t, df, pvalue as well as the confidence, etc. How exactly do I go about
doing that?



--
View this message in context: http://r.789695.n4.nabble.com/Welch-Two-Sample-T-Test-tp4648713.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list