summaryrefslogtreecommitdiff
path: root/291/CH4/EX4.3a
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /291/CH4/EX4.3a
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 '291/CH4/EX4.3a')
-rwxr-xr-x291/CH4/EX4.3a/eg4_3a.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/291/CH4/EX4.3a/eg4_3a.sce b/291/CH4/EX4.3a/eg4_3a.sce
new file mode 100755
index 000000000..0ab26bc52
--- /dev/null
+++ b/291/CH4/EX4.3a/eg4_3a.sce
@@ -0,0 +1,14 @@
+new = 3;
+working = 4;
+defective =5;
+total = factorial(12)/(factorial(3)*factorial(9));
+disp(factorial(5)/(factorial(3)*factorial(2)*total), "Probability that X=0 and Y=0");
+disp(factorial(5)*factorial(4)/(factorial(3)*factorial(2)*factorial(3)*total), "Probability that X=0 and Y=1");
+disp(factorial(5)*factorial(4)/(factorial(2)*factorial(2)*factorial(4)*total), "Probability that X=0 and Y=2");
+disp(factorial(4)/(factorial(3)*factorial(1)*total), "Probability that X=0 and Y=3");
+disp(factorial(3)*factorial(5)/(factorial(2)*factorial(2)*factorial(3)*total), "Probability that X=1 and Y=0");
+disp(factorial(5)*factorial(4)*factorial(3)/(factorial(2)*factorial(3)*factorial(4)*total), "Probability that X=1 and Y=1");
+disp(factorial(3)*factorial(4)/(factorial(2)*factorial(2)*factorial(2)*total), "Probability that X=1 and Y=2");
+disp(factorial(3)*factorial(5)/(factorial(2)*factorial(4)*factorial(1)*total), "Probability that X=2 and Y=0");
+disp(factorial(3)*factorial(4)/(factorial(2)*factorial(1)*factorial(3)*total), "Probability that X=2 and Y=1");
+disp(factorial(3)/(factorial(3)*total), "Probability that X=3 and Y=3"); \ No newline at end of file