summaryrefslogtreecommitdiff
path: root/1475/CH1/EX1.55/Example_1_55.sce
blob: 93d55749223b4934153415da1abf102b67db6ce0 (plain)
1
2
3
4
5
6
7
8
// 1.55 Two boxes contain respectively 4 white and 2 black
clc;
clear;
B1=(4/6);
B2=(2/6);
C= (3/5);
D= (4/5);
disp((B1*C)/((B1*C)+(B2*D)),"Using Bayes formula, Probability that transfered ball is white P(B1/A)=",D,"Probability that the ball drawn from the 2nd box is black, assuming that the transfered ball was black P(A/B2)=",C,"Probability that the ball drawn from the 2nd box is black, assuming that the transfered ball was white P(A/B1)=",B2,"Probability that the transfered ball was black P(B2)=",B1,"Probability that the transfered ball was white P(B1)=");