summaryrefslogtreecommitdiff
path: root/291/CH7/EX7.3h/eg7_3h.sce
blob: cd1af4f0db4db32e049e8976eaf5682ff41441c6 (plain)
1
2
3
4
5
6
7
8
9
10
num=10;
X= [0.123 0.133 0.124 0.126 0.120 0.130 0.125 0.128 0.124 0.126];
//disp(variance(X))
s2 = variance(X);
chi1 = cdfchi("X",num-1,0.95, 0.05  );
chi2 = cdfchi("X",num-1,0.05, 0.95  );
//disp(chi1, chi2)
lowerlim = (num-1)*s2/chi2;
upperlim = (num-1)*s2/chi1;
disp(sqrt(upperlim), "to ",sqrt(lowerlim),"The 90% confidence interval is "  )