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/CH7/EX7.13/Example_7_13.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/CH7/EX7.13/Example_7_13.sce')
-rwxr-xr-x | 331/CH7/EX7.13/Example_7_13.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/331/CH7/EX7.13/Example_7_13.sce b/331/CH7/EX7.13/Example_7_13.sce new file mode 100755 index 000000000..6b26e36d3 --- /dev/null +++ b/331/CH7/EX7.13/Example_7_13.sce @@ -0,0 +1,21 @@ +//Caption: Confidence Interval for Proportion
+//Example7.13
+//Page217
+
+clc;
+p = 0.40;// 40% of retailers enhance weekly sales
+q = 1-p;
+n = 64;// number of samples
+//pbar: proportion of success
+pbar = 32/n;//32 out of 64 are having enhanced sales after displaying advertisement
+Var = (p*q)/n; //variance
+Std = sqrt(Var);
+alpha = 0.1;
+alpha = alpha/2;
+z = standard_normal_zstat(alpha);
+CI = [pbar-z*Std,pbar+z*Std];
+disp(CI,'Confidence Interval of Proportion CI=')
+//Result
+//Confidence Interval of Proportion CI=
+//
+// 0.3995709 0.6004291
\ No newline at end of file |