From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 803/CH8/EX8.5/ex8_5.sce | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 803/CH8/EX8.5/ex8_5.sce (limited to '803/CH8/EX8.5') 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; -- cgit