summaryrefslogtreecommitdiff
path: root/291/CH4/EX4.3a/eg4_3a.sce
blob: 0ab26bc521e900199932507addb74c7a1381dede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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");