library(tigerstats) econ<-c(75,71,52,46,70,83) mgt<-c(82,73,59,48,68,93) me<-mean(econ) mm<-mean(mgt) ve<-var(econ) vm<-var(mgt) me;mm;ve;vm tc<-(me-mm)/(sqrt((ve/6)+(vm/6))) ptc1<-pt(tc, df=10, lower.tail=T) ptc2<-pt(-tc, df=10, lower.tail=F) t1<-qt(0.025, df=10, lower.tail=T) t2<-qt(0.025, df=10, lower.tail=F) tc;ptc1;ptc2;t1;t2 par(mfrow=c(2,1)) ptGC(c(-0.4952965,0.4952965),region="outside",df=10, graph=T) ptGC(c(-2.228139,2.228139),region="outside",df=10, graph=T) t.test(econ, mgt, conf.level=0.95) #Welch Two Sample t-test