summaryrefslogtreecommitdiff
path: root/331/CH8/EX8.5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /331/CH8/EX8.5
downloadScilab-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.5')
-rwxr-xr-x331/CH8/EX8.5/Example_8_5.sce53
1 files changed, 53 insertions, 0 deletions
diff --git a/331/CH8/EX8.5/Example_8_5.sce b/331/CH8/EX8.5/Example_8_5.sce
new file mode 100755
index 000000000..c0a52dae2
--- /dev/null
+++ b/331/CH8/EX8.5/Example_8_5.sce
@@ -0,0 +1,53 @@
+//Caption:One-tailed Tests Concerning Single Mean
+//(When the variance of the Population is Known and the Population is finite)
+//Example8.5
+//Page238
+//Test2: Ho:u>=k; H1:u<k
+clear
+clc;
+N = input('Enter the population size')
+u = input('Enter the Population Mean');
+Sigma2 = input('Enter the Populaion variance');
+std = sqrt(Sigma2); //standard deviation
+n = input('Enter the Sample Size');
+X = input('Enter the Sample Mean');
+alpha = input('Enter the significance level');
+Test = input('Enter the Type of test')
+//Calculation of Z statistic
+Zx = nor_dist_stat_finite_po(X,u,std,n,N)
+disp(Zx,'calculated Normal Z-statistic =')
+Z_alpha = standard_normal_zstat(alpha)
+disp(Z_alpha,'Standard Normal Stastistic=')
+if(Test==1) then
+ if(Zx <= Z_alpha) then
+ disp('It falls in the Acceptance Region')
+ disp('Then Null Hypothesis Ho should be Accepted')
+ elseif(Zx > Z_alpha) then
+ disp('It falls in the Rejection Region')
+ disp('Then Null Hypothesis Ho should be Rejected')
+ end
+ elseif(Test==2) then
+ if (Zx >=-Z_alpha) then
+ disp('It falls in the Acceptance Region')
+ disp('Then Null Hypothesis Ho should be Accepted')
+ elseif (Zx <-Z_alpha) then
+ disp('It falls in the Rejection Region')
+ disp('Then Null Hypothesis Ho should be Rejected')
+ end
+end
+//Result
+//Enter the population size 1000
+//Enter the Population Mean 8000
+//Enter the Populaion variance 160000
+//Enter the Sample Size 64
+//Enter the Sample Mean 7900
+//Enter the significance level 0.05
+//Enter the Type of test 2
+//
+// calculated Normal Z-statistic = - 2.0662117
+//
+// Standard Normal Stastistic= 1.64
+//It falls in the Rejection Region
+//
+// Then Null Hypothesis Ho should be Rejected
+// \ No newline at end of file