summaryrefslogtreecommitdiff
path: root/291/CH14/EX14.3a/eg14_3a.sce
blob: 45aab4d71f6ab90651fa56262b4e5dd7f65a5f38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
total =50;
failure = 15;
alpha = 0.05;
t =525;
val1 = cdfchi("X", 2*failure, alpha/2 , 1-(alpha/2));
val2 = cdfchi("X", 2*failure, 1-alpha/2 , (alpha/2));

int1 = 2*t/val1;
int2 = 2*t/val2;
disp("The 95% confidence interval is");
disp(int2);
disp(int1, "to");

//The confidence interval is from 22.35 to 62.17 whereas my solution in Scilab is 22.35 to 62.53 
because of the difference in the value of chi-square(0.975, 30). The textbook says the value is 16.89 
whereas scilab calculates its value as 16.79