Send output to: Browser Blue - Charts White Browser Black/White CSV Sample size Population Variance Sample Mean Null Hypothesis about mean Type I error (alpha) R Code par1<-as.numeric(par1) par2<-as.numeric(par2) par3<-as.numeric(par3) par4<-as.numeric(par4) par5<-as.numeric(par5) c <- 'NA' csn <- abs(qnorm(par5)) csn2 <- abs(qnorm(par5/2)) if (par3 == par4) { conclusion <- 'Error: the null hypothesis and sample mean must not be equal.' conclusion2 <- conclusion } else { cleft <- par3 - csn2 * sqrt(par2) / sqrt(par1) cright <- par3 + csn2 * sqrt(par2) / sqrt(par1) c2 <- paste('[',cleft) c2 <- paste(c2,', ') c2 <- paste(c2,cright) c2 <- paste(c2,']') if ((par4 < cleft) | (par4 > cright)) { conclusion2 <- 'Reject the null hypothesis' } else { conclusion2 <- 'Do not reject the null hypothesis' } } if (par3 > par4) { c <- par4 + csn * sqrt(par2) / sqrt(par1) if (par3 < c) { conclusion <- 'Do not reject the null hypothesis.' } else { conclusion <- 'Reject the null hypothesis.' } } if (par3 < par4) { c <- par4 - csn * sqrt(par2) / sqrt(par1) if (par3 > c) { conclusion <- 'Do not reject the null hypothesis.' } else { conclusion <- 'Reject the null hypothesis.' } } print(c) print(conclusion) load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Testing Mean with known Variance',2,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'sample size',header=TRUE) a<-table.element(a,par1) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'population variance',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,par3) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'null hypothesis about mean',header=TRUE) a<-table.element(a,par4) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'type I error',header=TRUE) a<-table.element(a,par5) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'critical value (one-tailed)',header=TRUE) a<-table.element(a,c) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'confidence interval (two-tailed)
(sample mean)',header=TRUE) a<-table.element(a,c2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'conclusion for one-tailed test',2,header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,conclusion,2) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'conclusion for two-tailed test',2,header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,conclusion2,2) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab')

 Summary of computational transaction Raw Input view raw input (R code) Raw Output view raw output of R engine Computing time 0 seconds R Server Big Analytics Cloud Computing Center

 Testing Mean with known Variance sample size 25 population variance 0.001225 sample mean 1.49 null hypothesis about mean 1.5 type I error 0.05 critical value (one-tailed) 1.48848602461134 confidence interval (two-tailed)(sample mean) [ 1.47628025210822 , 1.50371974789178 ] conclusion for one-tailed test Do not reject the null hypothesis. conclusion for two-tailed test Do not reject the null hypothesis