summaryrefslogtreecommitdiff
path: root/291
diff options
context:
space:
mode:
Diffstat (limited to '291')
-rwxr-xr-x291/CH2/EX2.4a/eg2_4a.sce10
-rwxr-xr-x291/CH2/EX2.5a/eg2_5a.sce16
-rwxr-xr-x291/CH8/EX8.3e/eg8_3e.sce16
-rwxr-xr-x291/CH9/EX9.10c/eg9_10c.sce87
4 files changed, 64 insertions, 65 deletions
diff --git a/291/CH2/EX2.4a/eg2_4a.sce b/291/CH2/EX2.4a/eg2_4a.sce
index a6ca40930..948568532 100755
--- a/291/CH2/EX2.4a/eg2_4a.sce
+++ b/291/CH2/EX2.4a/eg2_4a.sce
@@ -1,5 +1,5 @@
-cars = [448162 404192 368327 318308 272122 260486 249128 234936 218540 207977];
-interval1 = mean(cars) - (1.5*st_deviation(cars));
-interval2 = mean(cars) + (1.5*st_deviation(cars));
-data = 100*5/9;
-disp(interval2, , "to" , interval1, "Atleast 55.55% of the data lies in the interval" );
+cars = [448162 404192 368327 318308 272122 260486 249128 234936 218540 207977];
+interval1 = mean(cars) - (1.5*stdev(cars));
+interval2 = mean(cars) + (1.5*stdev(cars));
+data = 100*5/9;
+disp(interval2, , "to" , interval1, "Atleast 55.55% of the data lies in the interval" ); \ No newline at end of file
diff --git a/291/CH2/EX2.5a/eg2_5a.sce b/291/CH2/EX2.5a/eg2_5a.sce
index f628c5447..54177d474 100755
--- a/291/CH2/EX2.5a/eg2_5a.sce
+++ b/291/CH2/EX2.5a/eg2_5a.sce
@@ -1,8 +1,8 @@
-data = [90 91 94 83 85 85 87 88 72 74 74 75 77 77 78 60 62 63 64 66 66 52 55 55 56 58 43 46];
-disp("According to the empirical rule")
-disp("68% of the data lies between")
-disp(mean(data)+st_deviation(data), "and", mean(data)-st_deviation(data))
-disp("95% of the data lies between")
-disp(mean(data)+(2*st_deviation(data)), "and", mean(data)-(2*st_deviation(data)) )
-disp("99.7% of the data lies between")
-disp(mean(data)+(3*st_deviation(data)), "and", mean(data)-(3*st_deviation(data))) \ No newline at end of file
+data = [90 91 94 83 85 85 87 88 72 74 74 75 77 77 78 60 62 63 64 66 66 52 55 55 56 58 43 46];
+disp("According to the empirical rule")
+disp("68% of the data lies between")
+disp(mean(data)+stdev(data), "and", mean(data)-stdev(data))
+disp("95% of the data lies between")
+disp(mean(data)+(2*stdev(data)), "and", mean(data)-(2*stdev(data)) )
+disp("99.7% of the data lies between")
+disp(mean(data)+(3*stdev(data)), "and", mean(data)-(3*stdev(data))) \ No newline at end of file
diff --git a/291/CH8/EX8.3e/eg8_3e.sce b/291/CH8/EX8.3e/eg8_3e.sce
index e3712ff9a..b9db0bee3 100755
--- a/291/CH8/EX8.3e/eg8_3e.sce
+++ b/291/CH8/EX8.3e/eg8_3e.sce
@@ -1,8 +1,8 @@
-n =5;
-Xbar = 9.5;
-uo = 8;
-var = 4;
-statistic = sqrt(n/var)*(Xbar - u);
-p = 1 - cdfnor("PQ", statistic, 0, 1);
-disp("The test would call for rejection at all significance levels greater than or equal to ")
-disp(p);
+n =5;
+Xbar = 9.5;
+uo = 8;
+var = 4;
+statistic = sqrt(n/var)*(Xbar - uo);
+p = 1 - cdfnor("PQ", statistic, 0, 1);
+disp("The test would call for rejection at all significance levels greater than or equal to ")
+disp(p); \ No newline at end of file
diff --git a/291/CH9/EX9.10c/eg9_10c.sce b/291/CH9/EX9.10c/eg9_10c.sce
index c4e637a3b..0612c0de6 100755
--- a/291/CH9/EX9.10c/eg9_10c.sce
+++ b/291/CH9/EX9.10c/eg9_10c.sce
@@ -1,44 +1,43 @@
-x1 = [44 33 33 32 34 31 33 30 34 34 33 36 33 34 37];
-x2= [1.3 2.2 2.2 2.6 2.0 1.8 2.2 3.6 1.6 1.5 2.2 1.7 2.2 1.3 2.6];
-x3 = [250 115 75 85 100 75 85 75 225 250 255 175 75 85 90];
-x4= [0.63 0.59 0.56 0.55 0.54 0.59 0.56 0.46 0.63 0.60 0.63 0.58 0.55 0.57 0.62 ];
-y = [18.1; 19.6; 16.6; 16.4; 16.9 ;17.0; 20.0; 16.6; 16.2; 18.5 ; 18.7; 19.4; 17.6; 18.3; 18.8];
-n =length(x1);
-x= ones(15, 5);
-for i=1:15
- x(i,2)= x1(i);
- x(i,3)= x2(i);
- x(i,4)= x3(i);
- x(i,5)= x4(i);
-end
-pro1 = x';
-//disp(pro1);
-pro2= pro1*x;
-//disp(pro2);
-pro3 = inv(pro2);
-//disp(pro3);
-pro4 = pro3*pro1;
-pro5 = pro4*y;
-
-for i=1:5
- B(i,1)= 0;
- for k=1:15
- B(i,1)=B(i,1)+(pro4(i, k)*y(k, 1));
- end
-end
-SSR = y';
-SSR= SSR*y;
-sub = B';
-sub = sub*x';
-sub= sub*y;
-SSR =SSR - sub;
-//disp(SSR);
-//disp(B(2))
-xxinv = 0.379;
-k= 4;
-ts = sqrt((n-k-2)/SSR)*B(2)/0.616;
-pvalue = 2*(1- cdft("PQ",ts, n-k-2 ));
-disp(pvalue, "The p-value is")
-
-The SSR calculated by scilab is 19.34 whereas the textbook gives the value as 19.26 , thus the
-difference in the final answer.
+x1 = [44 33 33 32 34 31 33 30 34 34 33 36 33 34 37];
+x2= [1.3 2.2 2.2 2.6 2.0 1.8 2.2 3.6 1.6 1.5 2.2 1.7 2.2 1.3 2.6];
+x3 = [250 115 75 85 100 75 85 75 225 250 255 175 75 85 90];
+x4= [0.63 0.59 0.56 0.55 0.54 0.59 0.56 0.46 0.63 0.60 0.63 0.58 0.55 0.57 0.62 ];
+y = [18.1; 19.6; 16.6; 16.4; 16.9 ;17.0; 20.0; 16.6; 16.2; 18.5 ; 18.7; 19.4; 17.6; 18.3; 18.8];
+n =length(x1);
+x= ones(15, 5);
+for i=1:15
+ x(i,2)= x1(i);
+ x(i,3)= x2(i);
+ x(i,4)= x3(i);
+ x(i,5)= x4(i);
+end
+pro1 = x';
+//disp(pro1);
+pro2= pro1*x;
+//disp(pro2);
+pro3 = inv(pro2);
+//disp(pro3);
+pro4 = pro3*pro1;
+pro5 = pro4*y;
+
+for i=1:5
+ B(i,1)= 0;
+ for k=1:15
+ B(i,1)=B(i,1)+(pro4(i, k)*y(k, 1));
+ end
+end
+SSR = y';
+SSR= SSR*y;
+sub = B';
+sub = sub*x';
+sub= sub*y;
+SSR =SSR - sub;
+//disp(SSR);
+//disp(B(2))
+xxinv = 0.379;
+k= 4;
+ts = sqrt((n-k-2)/SSR)*B(2)/0.616;
+pvalue = 2*(1- cdft("PQ",ts, n-k-2 ));
+disp(pvalue, "The p-value is")
+
+//The SSR calculated by scilab is 19.34 whereas the textbook gives the value as 19.26 , thus the difference in the final answer. \ No newline at end of file