R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. > par4 = '0.35' > par3 = '13' > par2 = '13.7808' > par1 = '63' > par1<-as.numeric(par1) > par2<-as.numeric(par2) > par3<-as.numeric(par3) > par4<-as.numeric(par4) > df <- par1 - 1 > if (par2 > par3) + { + myc <- par3 / df * qchisq(1-par4,df) + } else { + myc <- par3 / df * qchisq(par4,df) + } > myc [1] 13.77536 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ht_variance.htm','Testing Variance - Critical value (region)','learn more about Statistical Hypothesis Testing about the 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,'Sample variance',header=TRUE) > a<-table.element(a,par2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Null hypothesis (H0)',header=TRUE) > a<-table.element(a,par3) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Type I error (alpha)',header=TRUE) > a<-table.element(a,par4) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Critical value',header=TRUE) > a<-table.element(a,myc) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Conclusion',header=TRUE) > if (par2 > par3) + { + if (par2 < myc) a<-table.element(a,'There is no reason to reject the null hypothesis') else a<-table.element(a,'Reject the null hypothesis') + } else { + if (par2 > myc) a<-table.element(a,'There is no reason to reject the null hypothesis') else a<-table.element(a,'Reject the null hypothesis') + } > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/16riz1355871454.tab") > > > > proc.time() user system elapsed 0.272 0.093 0.347