library(tigerstats) x<-c(36,37,38,39,39,44,47) xbar<-mean(x) xbar s.sq<-var(x) s.sq df=6 q=length(x)-1 chi<-(df*s.sq)/62 chi pchisq(chi, df=q,lower.tail=F) pchisq(chi, df=q,lower.tail=T) UCV<-qchisq(0.025, df=q, lower.tail=F) LCV<-qchisq(0.975, df=q, lower.tail=F) UCV;LCV par(mfrow=c(2,1)) pchisqGC(1.237,region="below",df=6, graph=T) pchisqGC(14.45,region="above",df=6, graph=T)