diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /331/CH8/EX8.31/Example_8_31.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '331/CH8/EX8.31/Example_8_31.sce')
-rwxr-xr-x | 331/CH8/EX8.31/Example_8_31.sce | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/331/CH8/EX8.31/Example_8_31.sce b/331/CH8/EX8.31/Example_8_31.sce new file mode 100755 index 000000000..9e1b10a3e --- /dev/null +++ b/331/CH8/EX8.31/Example_8_31.sce @@ -0,0 +1,34 @@ +//Caption: Two-tailed Chi-square Test Concerning Single Population Variance
+//Example8.31
+//Page286
+//Test 2: Ho:Var =k; H1:Var#k
+
+clc;
+Var = 0.25; //popualtion variance of the weight of the drugs in mg
+n = 12;// sample size
+S2 = 0.49;//sample variance of the weight of drugs in mg
+Alpha = 0.10;
+Alpha = Alpha/2;
+Xchi = ((n-1)*S2)/Var;//chi-square statistic to test the variance
+Xchi_stand = Chi_test(Alpha,[])
+disp(Xchi,'The calculated Value chi-square value =')
+disp(Xchi_stand,'The table value of chi-square test =')
+if ((Xchi < Xchi_stand) &(Xchi< Xchi_stand)) then
+ disp('It falls in the Acceptance Region')
+ disp('Then Null Hypothesis Ho should be Accepted')
+else
+ disp('It falls in the Rejection Region')
+ disp('Then Null Hypothesis Ho should be Rejected')
+end
+//Result
+//The calculated Value chi-square value =
+//
+// 21.56
+//
+// The table value of chi-square test =
+//
+// 4.575 19.675
+//
+// It falls in the Rejection Region
+//
+// Then Null Hypothesis Ho should be Rejected
|