ex5m1_5.doc

advertisement
Random Signals for Engineers using MATLAB and Mathcad
Copyright  1999 Springer Verlag NY
Example 1.5
Given 4 mutually exclusive events {A, B, C, D} with three conditions on the occurrence of these
events as: Prob[A or B or C ] = 2/3 , Prob[A or B ] =1/5 and Prob[ A or C or D ] = 5/6. What is the
P[A] ... P[D] ?
SOLUTION: Each of the 3 probability expressions of the problem statement can be expanded
using Equation 1.6-2 to obtain 3 equations for the 4 unknown probabilities. The 4th equation can
be derived from the fact that surely one of the four possible events must occur or that the Prob[ A
or B or C or D ] = 1. Using the equation solving capability of Matlab, we solve for the unknown
probabilities, P[A] ... P[D] . We use the symbols P[A] = p1 etc.
syms p1 p2 p3 p4
eq1 = p1 + p2 +p3 -2/3;
eq2 = p1 +p2 - 1/5;
eq3 = p1 +p3 + p4 -5/6;
eq4 = p1+p2+p3+p4-1;
S=solve(eq1,eq2,eq3,eq4)
S =
p1:
p2:
p3:
p4:
[1x1
[1x1
[1x1
[1x1
sym]
sym]
sym]
sym]
[S.p1 S.p2 S.p3 S.p4]
ans =
[ 1/30,
1/6, 7/15,
1/3]
double([S.p1 S.p2 S.p3 S.p4])
ans =
0.0333
0.1667
0.4667
0.3333
We have solved for the four probabilities require by the problem statement or P[A] = 0.033 , P[B] =
0.167, P[C] = 0.467 and P[D] = 0.333.
Download