From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 331/CH7/EX7.13/Example_7_13.sce | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 331/CH7/EX7.13/Example_7_13.sce (limited to '331/CH7/EX7.13/Example_7_13.sce') 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 -- cgit