R version 2.11.1 (2010-05-31) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(19,25,17,22,21,26,20,14,23,20,22,15,20,22,20,28,25,26,17,23,13,24,14,22,23,22,24,21,23,22,21,26,15,25,17,25,27,25,19,26,20,20,18,18,19,23,17,23,23,11,18,24,16,24,24,21,25,22,21,24,24,21,18) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '20' > par1 = '0.65' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > len <- length(x) > df <- len - 1 > sd <- sd(x) > mx <- mean(x) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/1sa651288125369.tab") > > > proc.time() user system elapsed 0.220 0.120 0.307