R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(22,2,0,4,14,2,0,4,6,25,0,25,0,2,30,1,0,0,8,0,0,0,6,0,6,12,1,20,5,0,21,3,5,8,10,5,8,6,15,9,14,9,5,9,10,12,9,7,15,14,16,6,6,2,8,0,6,4,15,0,12,0,13,18,4,9,12,14,0,4,12,15,0,30,0,0,3,2,15,3,4,12,8,12,18,15,3,0,0,21,10,5,0,1,0,6,12,10,0,25,3,15,10,15,4,10,2,12,9,1,4,2,0,1,0,0,0,18,3,6,0,2,4,15,6,30,3,18,10,0,7,0,22,7,4,15,5,14,11,24,24,0,20,12,7,0,28,12,15,0,7,8,30,14,3,3,0,15,0,11,1,30,4,0,3,0,0,0,0,12,26,0,6,0,4,19,16,8,10,6,2,0,30,8,0,10,15,21,1,5,0,4,1,4,24,11,0,0,0,1,0,30,6,0,9,5,2,8,16,0,12,0,0,9,10,5,2,6,0,0,0,24,0,18,1,4,0,2,12,0,10,0,0,0,2,0,20,0,8,1,2,10,10,12,17,6,4,21,0,15,1,14,7,19,6,14,26,0,0,0,0,0,2,8,20,7,1,0,13,0,19,0,0,6,0,1,6,30,0,5,15,0,6,0,14,21,0,16,30,15,30,9,0,0,8,29,21,6,0,6) > par2 = '8' > par1 = '0.97' > par2 <- '8' > par1 <- '0.97' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 () > #Author: root > #To cite this work: Wessa P., (2013), Testing Population Mean with unknown Variance (confidence intervals) (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_hypothesismeanu.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > len <- length(x) > df <- len - 1 > sd <- sd(x) > mx <- mean(x) > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > delta2 <- abs(qt((1-par1)/2,df)) * sd / sqrt(len) > delta1 <- abs(qt((1-par1),df)) * sd / sqrt(len) > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Hypothesis Test about the Mean - Confidence Interval',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Sample size',header=TRUE) > a<-table.element(a,len) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Sample standard deviation',header=TRUE) > a<-table.element(a,sd) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Confidence',header=TRUE) > a<-table.element(a,par1) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Null hypothesis',header=TRUE) > a<-table.element(a,par2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Sample Mean',header=TRUE) > a<-table.element(a,mx) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'2-sided Confidence Interval',header=TRUE) > dum <- paste('[',mx-delta2) > dum <- paste(dum,',') > dum <- paste(dum,mx+delta2) > dum <- paste(dum,']') > a<-table.element(a,dum) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Left-sided Confidence Interval',header=TRUE) > dum <- paste('[',mx-delta1) > dum <- paste(dum,', +inf ]') > a<-table.element(a,dum) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Right-sided Confidence Interval',header=TRUE) > dum <- paste('[ -inf, ',mx+delta1) > dum <- paste(dum,']') > a<-table.element(a,dum) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1g82t1387445516.tab") > > > > proc.time() user system elapsed 0.446 0.137 0.549