summaryrefslogtreecommitdiff
path: root/291/CH3/EX3.5d/eg3_5d.sce
blob: fc6b7a990506aeeb02750f3c67972b045985605d (plain)
1
2
3
4
5
6
7
men = 6;
women = 9;
reqd_size =5;
total =factorial(men+women)/(factorial(reqd_size)*factorial(men+women-reqd_size));
given_committee = factorial(men)*factorial(women)/(factorial(3)*factorial(2)*factorial(men-3)*factorial(women-2));
prob = given_committee/total;
disp(prob, "Probability that the committee consists of 3 men and 2 women is")