Random Signals for Engineers using MATLAB and Mathcad Copyright 1999 Springer Verlag NY Example 1.7 Let us assume that three machines are maufacturing parts . For every bin we fill with 100 parts machine A contributes 20 parts machine B contributes 30 parts machine C contributes50 parts In addition, we know that for every 100 parts manufactured that each machine manufacters machine A makes 6 defective parts machine B makes 7 defective parts machine C makes 8 defective parts SOLUTION: Let us first compute the probability that a part selected from the bin is defective. We can define the following probabilities: Pa=0.2;Pb=0.3;Pc=0.5; [Pa Pb Pc] ans = 0.2000 0.3000 0.5000 Pda=0.06;Pdb=0.07;Pdc=0.08; [Pda Pdb Pdc] ans = 0.0600 0.0700 0.0800 We have defined PdA to be the P[defective part from bin | machine A made it] = P dA. Using the law of total probability we have Pd=Pda*Pa+ Pdb*Pb + Pdc*Pc Pd = 0.0730 Now we may determine given that we have selected a part and it is defective what is the probability that is was manufactured by machine A, B or C. This may be computed using the Equation 1.7-6. This is said to be the a posterori probability because we are computing the probability of an event after we have knowledge of a prior event occuring. Defining P[machine A made it | a defective part was taken from the bin] = PAd we have Pad=Pda*Pa/Pd; [Pad Pbd Pcd] ans = 0.1644 Pbd=Pdb*Pb/Pd; 0.2877 Pcd=Pdc*Pc/Pd; 0.5479 We, of course, may verify that the sum of all the conditional probabilities is unity, because one machine had to make the defective part. Pad + Pbd +Pcd ans = 1