summaryrefslogtreecommitdiff
path: root/803/CH8
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /803/CH8
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '803/CH8')
-rw-r--r--803/CH8/EX8.2/ex8_2.sce10
-rw-r--r--803/CH8/EX8.4/ex8_4.pngbin0 -> 20789 bytes
-rw-r--r--803/CH8/EX8.4/ex8_4.sce18
-rw-r--r--803/CH8/EX8.5/ex8_5.sce21
4 files changed, 49 insertions, 0 deletions
diff --git a/803/CH8/EX8.2/ex8_2.sce b/803/CH8/EX8.2/ex8_2.sce
new file mode 100644
index 000000000..9724692fc
--- /dev/null
+++ b/803/CH8/EX8.2/ex8_2.sce
@@ -0,0 +1,10 @@
+clc
+R=[1/2 2/5 2/3];.........................//probability of drawing a red ball
+a=1/3;..//probability of drawing any container
+Den=sum(R)*a;
+b=R(1)*a;
+c=R(2)*a;
+d=R(3)*a;
+disp(b/Den,"ans1");
+disp(c/Den,"ans2");
+disp(d/Den,"ans3");
diff --git a/803/CH8/EX8.4/ex8_4.png b/803/CH8/EX8.4/ex8_4.png
new file mode 100644
index 000000000..888d60b31
--- /dev/null
+++ b/803/CH8/EX8.4/ex8_4.png
Binary files differ
diff --git a/803/CH8/EX8.4/ex8_4.sce b/803/CH8/EX8.4/ex8_4.sce
new file mode 100644
index 000000000..274ea86a4
--- /dev/null
+++ b/803/CH8/EX8.4/ex8_4.sce
@@ -0,0 +1,18 @@
+clc
+b=[0 1 2 3 4 5 6];..........................//breakdown/day
+f=[340 121 53 30 12 4 0];...................//frequency
+Den=sum(f);
+ans=0;
+for i=1:7
+ ans=ans+[f(i) * b(i)];
+end
+Mean=ans/Den;...............................//calculation of expectance
+disp(Mean,"mean");
+
+k=0:1:6;
+y=(exp(-Mean)*(Mean^k)). /factorial(k);
+disp(y);
+plot2d(k,y);......................//Poisson distribution
+title("Poisson Distribution",k,y);
+xlabel("Breakdown/day");
+ylabel("Probability");
diff --git a/803/CH8/EX8.5/ex8_5.sce b/803/CH8/EX8.5/ex8_5.sce
new file mode 100644
index 000000000..c5bd3544c
--- /dev/null
+++ b/803/CH8/EX8.5/ex8_5.sce
@@ -0,0 +1,21 @@
+clc
+n=10;...................................//total pulses selected
+p=0.8;..................................//probability of pulses hitting the dish
+q=0.2;..................................//probability of miss
+add=0;
+for k=2;
+ x(k)=((factorial(n)*(p^k)*((1-p)^(n-k)))/(factorial(k)*factorial(n-k)));
+ disp(x(k),"Exactly two pulses missing the target");
+end;
+for k=0:1
+ x(k)=((factorial(n)*(p^k)*((1-p)^(n-k)))/(factorial(k)*factorial(n-k)));
+ add=add+x(k);
+end;
+ y(k)=1-add;
+ disp(y(k),"Two or more pulses missing the target");
+for k=6:10
+ x(k)=((factorial(n)*(p^k)*((1-p)^(n-k)))/(factorial(k)*factorial(n-(k)));
+ y(k)=sum(x(k));
+ disp(y(k),"More than 5 pulses missing the target");
+
+end;