1 Formula of Total Probablty, Bayes Rule, and Applcatons Recall that for any event A, the par of events A and A has an ntersecton that s empty, whereas the unon A A represents the total populaton of nterest. In fact, ths par of events { A, } space, herenafter denoted by S. A s a specal case of a partton of the sample 1. Partton of Sample Space and Formula of Total Probablty. Defnton of Partton. A collecton of events { S S S } 1, 2,, n of a certan sample space (or populaton) S s called a partton f () S1, S2,, Sn are mutually exclusve events; () S1 S2 Sn = S. Illustratve Example. In the nneteenth century G. Mendel conducted a famous experment that led to the frst announcement of elementary genetc prncples. He bred hybrd strans of peas and smultaneously observed the color (green or yellow) and smoothness (round or wrnkled) of the offsprng peas. If S denotes the set of all peas nvolved n the pea-breedng experment, and S 1 denotes the subpopulaton of round and green peas; S 2 denotes the subpopulaton of round and yellow peas; S 3 denotes the subpopulaton of wrnkled and green peas; S denotes the subpopulaton of wrnkled and yellow peas; 4 then {,,, } S S S S represents a partton of S. 1 2 3 4 Formula of Total Probablty. 1, 2,, n consttutes a partton of the sample space S. Assume that for every, 1 n, Assume that the set of events { S S S } Then for any event A, we have P( S ) > 0. (1) P( A) = P( S ) P( A S ) n. = 1
2 Proof. It follows from the multplcaton law of probablty that for every, 1 n, ( ) ( ) ( ) P S P A S = P AS. On the other hand, snce the events S 1, S 2,, Sn are mutually exclusve, we have that the events AS1, AS2, ASn are also mutually exclusve. In addton note that (2) AS1 AS2 ASn = A. It would be nstructve f the student tres to verfy (2) by use of a Venn dagram. Then an applcaton of the addton law of probablty to (2) gves (1). Illustratve Example. A dagnostc test for a certan dsease s known to be 95% accurate,.e., f a person has the dsease, the test wll detect t wth probablty 0.95. Also, f the person does not have the dsease, the test wll report that they do not have t wth the same probablty 0.95. In addton, t s known from prevous data that only 1% of the populaton has ths partcular dsease. What s the probablty that a partcular person chosen at random wll be tested postve? Soluton. Let T denote the event that a person s tested postve; T denote the event that a person s tested negatvely; D denote the event that a person has the dsease. Then t follows from the above stated condtons that we have that P T In partcular, snce P( D ) = 0.01, P( D ) = 0.99, ( D) = 0.95, and P( T D) ( ) ( ) 0.95 = 0.95. P T D P T D = 1, ( D) P T = 0.05. Now we apply the formula of total probablty from (1) wth A = T, n = 2, S1 = D, and S2 = D, to obtan
3 ( ) = ( ) ( ) ( ) ( ) P T P T D P D PT D P D = (0.95) (0.01) (0.05) (0.99) 0.059. 2. Bayes Rule. Ths mportant rule enables one to compute a condtonal probablty when the orgnal condton now becomes the event of nterest. Assume that the set { S1, S2,, Sn } consttutes a partton of the sample space S. Assume that for each, 1 n, ( ) 0 P S >. Fx any event A. Then for any gven j, 1 j n, (3) P( Sj A) = n = 1 ( j) P( A S j) P S P S ( ) P( A S ) The key thng to note about Bayes theorem s that the nformaton that wll be gven n a problem wll be the condtonal probabltes P( A S ),1 n, that appear on the rght-hand sde of the equaton, whereas what s sought s one of the P S A, where the events S j and A are reversed from the gven nformaton. I.e., gven that A occurred, what s the probablty t happened through S. condtonal probabltes, ( j ) j Proof of Bayes theorem. Note that by the multplcaton law of probablty, the numerator of the fracton on the rght-hand sde of (3) can be rewrtten as ( j) ( j) ( j) P S P A S = P AS. At the same tme, by the formula of total probablty (formula (1) above), the denomnator of the fracton on the rght-hand sde of (3) s equal to n = 1 ( ) ( ) ( ) P S P A S = P A. Hence, the rght-hand sde of (3) s equal to ( j ) P AS = P S P( A) by the defnton of condtonal probablty. ( j A).
4 3. Examples. Illustratve Example 1. It s qute common that dfferent llnesses produce smlar or even dentcal symptoms. Suppose that any one of the llnesses X, Y, or Z lead to the same set of symptoms, hereafter denoted as U. For smplcty assume that the llnesses X, Y, and Z are mutually exclusve and that there are no other llnesses leadng to the same set of symptoms. Suppose the probabltes of contractng these three llnesses are: P X =, PY ( ) = 0.01, PZ ( ) = 0.02, ( ) 0.03 and that the chances of developng the set of symptoms U, gven a specfc llness are: PU ( X ) = 0.85, PU ( Y ) = 0.92 PU ( Z ) = 0.80. If a sck person develops the set of symptoms U, what are the chances he or she has llness X? Soluton. Frst note that the set of events X, Y, and Z together do not represent a partton. Therefore, defne H to be the event of not sufferng from any of X, Y, or Z,.e., the complement of the unon of X, Y, and Z, Then we have H = X Y Z. ( ) = 1 ( ) ( ) ( ) P H P X PY P Z = 1 0.03 0.01 0.02 = 0.94. However, PU ( H ) = 0. Applyng Bayes rule yelds that the condtonal probablty that gven the symptoms, P X U, s U that a person ndeed has the llness X, vz., ( ) PU ( X) P( X) ( ) = PU ( X) P( X) PU ( Y) PY ( ) PU ( Z) P( Z) PU ( H) P( H) P X U = (0.85) (0.03) (0.85) (0.03) (0.92) (0.01) (0.80) (0.02) 0 = 0.5029. Note that the data gven at the outset of the problem above nvolved the condtonal probabltes of U gven X, U gven Y, U gven Z, and U gven H, but what was sought was the condtonal probablty of X gven U, whch
5 nvolved the reverse of the condtons of the gven data n the problem. Ths s the prototypcal stuaton for the applcaton of Bayes theorem. Illustratve Example 2. In ths example we consder a stuaton somewhat lke the earler example above on pp. 2 and 3 of ths nsert followng the formula of total probablty. Suppose we are concerned wth medcally testng for leukema. Let T denote the event that the test s postve, suggestng the person has leukema; T denote the event that the test s negatve, suggestng the person does not have leukema; L denote the event that the person tested has leukema; L denote the event that the person tested does not have leukema. It s the case that the medcal test for leukema s not perfectly accurate. Most of the tme, f one has leukema, the test wll be postve. Past records ndcate that P( T L) 0.98 s usually negatve. Agan, t s known that PT ( L) =. Smlarly, f one does not have leukema, the test = 0.99. All ths notwthstandng, there are people who sometmes test postvely, but do not, n fact, have the dsease; and some who test negatvely, but do ndeed have the dsease. If we also know that PL ( ) = 0.000001, fnd: and (a) the probablty P( L T ) (b) the probablty P( L T ) of a false postve test; of a false negatve test. Soluton. (a) Note agan that n ths problem we are gven the condtonal probabltes of T gven L and T gven L, but are asked to fnd the condtonal probabltes that have the T, T events and the L, L events reversed. Hence we employ Bayes rule. Ths yelds Snce ( ) P L T = P( T L ) P( L) ( ) ( ) ( ) ( ) P T L P L P T L P L ( ) PL ( ) P L = 1 = 0.999999,.
6 and ( ) ( ) P T L = 1 P T L = 0.01, we obtan (0.01) (0.999999) P( L T ) = (0.01) (0.999999) (0.98) (0.000001) 0.99991. In partcular, ths mples that ( ) P( L T ) P L T = 1 0.00009. (b) Try to compute P( L T ) n an analogous manner as an exercse. (Answer: 8 2.020204 10.)