matthew5555 wrote: > Hi, how can I solve a problem without the function t.test??? > > for example: > x<-(1,3,5,7) > y<-(2,4,6) > t.test(x,y,alternative="less",paired=FALSE,var.equal=TRUE,conf.level=0.95) > > > Homework?
Hints: Take out your statistics textbook and look up the formulas for the two-sample t. You'll probably (there can be some variation depending on the book) find that you need to compute - difference of means - sd for each group - pooled sd - s.e. of differences of means all of which you can do easily in R, once you have the formulas. Then calculate the t statistic and the corresponding p value, either using a table or R's function for the t distibution. -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.