# input data
> a<-c(2.2, 2.0, 2.1, 2.3, 2.0, 1.9, 2.2, 2.4, 2.0, 2.1)
# output data
> a
[1] 2.2 2.0 2.1 2.3 2.0 1.9 2.2 2.4 2.0 2.1
> n<-length(a)
> o<-n-1
> s<-o*var(a)
>
> o2<-0.1
>
> chi2<-s/o2
> chi2
[1] 2.16
> p.value<-pchisq(c(chi2), df=o, lower.tail=TRUE)
> p.value
[1] 0.01132281
# 95% confidence interval of the population
> m1<-qchisq(c(0.025),df=o, lower.tail=TRUE)
> m2<-qchisq(c(0.975),df=o, lower.tail=TRUE)
>
> lower95<-s/m2
> upper95<-s/m1
>
> lower95
[1] 0.01135481
> upper95
[1] 0.07998846