Lecture 18, Bayes’ Theorem & Random VariablesTheorem 1 (Bayes’ Theorem). Assume Ω = F1∪ F2, and F1∩ F2= ∅.Thenp(Fi|E) =p(Fi|E)p(Fi)p(E|F1)p(F1) + p(E|F2)p(F2), i = 1, 2Proof. Asp(E ∩ Fi) = p(E|Fi)p(Fi),andp(E) = p(E ∩ F1) + p(E ∩ F2) = p(E|F1)p(F1) + p(E|F2)p(F2).Thenp(Fi|E) =p(E ∩ Fi)p(E)=p(Fi|E)p(Fi)p(E|F1)p(F1) + p(E|F2)p(F2) Example 1. Consider a medical test for a disease D. The false positiverate is 2% and false negative rate is 1%. The probability that a people hasdisease D is p(D) = 0.001. A patient takes the test and has a positiveoutcome. What is the chance that he has disease D?We know that p(D) = 0.001 and p(Dc) = 0.999. Also we have p(y|D) =0.99 and p(y|Dc) = 0.02, then we can computep(D|y) =p(y|D)p(D)p(y|D)p(D) + p(y|Dc)p(Dc)=0.99 × 0.0010.99 × 0.001 + 0.02 × 0.999= 0.0472Trial process: repeat an experiment many times. The process is said tobe independent if the outcome of the ith trial doesn’t depend on the i − 1preceding outcomes, i.e.,p(Ai|Ai−1∩ Ai−2∩ · · · ∩ A1) = p(Ai)Given an independent trail process, the probability to see an sequence ofoutcome a1, a2, . . . , anis given by p(a1)p(a2) · · · p(an). If the experimenthas only two outcomes, the trail is also called a Bernouli trail.Random variable: is a function from the sample space to the real num-bers. It is not a variable, and not random.Example 2. Suppose that a coin is flipped three times. Let X(t) be therandom variable that equals the number of heads that appear when t is theoutcome. Then X(t) takes on the following values:X(HHH) = 3X(HHT ) = X(HT H) = X(T HH) = 2X(HT T ) = X(T HT ) = X(T T H) = 1X(T T T ) = 012People usually use notation X = r to represent the set of outcomes thatare mapped to value r by the random variable. Note that X = r consists ofoutcomes, we can compute the probability of this set. Therefore, for eachvalue of r, we can compute p(X = r). The pair {r, p(X = r)} is called thedistribution of the random
View Full Document