Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Indeterminism wikipedia , lookup
History of randomness wikipedia , lookup
Dempster–Shafer theory wikipedia , lookup
Infinite monkey theorem wikipedia , lookup
Probability box wikipedia , lookup
Birthday problem wikipedia , lookup
Ars Conjectandi wikipedia , lookup
Inductive probability wikipedia , lookup
Conditional probability and independence Statistics 2013 Lectures Part 5 - Conditional Probability Institute of Economic Studies Faculty of Social Sciences Charles University in Prague 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Conditional probability So far, we know how to compute the probability of events based on outcomes of an experiment(s). What if the event has already occurred or we have some extra information about the event...this, of course, may affect the probability of the event Example 17: You roll a die, I see the result and tell you that it is an even number. What is the probability that number 6 shows up? Example 18: You are to guess on the probability of rain today. Will your answer be the same if you sitting inside a windowless office or if you are outside watching the sky? 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Conditional probability Definition 14: Let A, B ∈ A, P(B) > 0. The conditional probability of A given event B is defined as P(A|B) = P(AB) . P(B) P(A|B) can be approximated by a frequency of A among the cases where B has occurred P(A|B) = lim N(A ∩ B) N(B) Clearly P(AB) = P(A|B)P(B) = P(B|A)P(A) regardless of the probabilities of events A and B. Theorem 8: If B ∈ A, P(B) > 0 then P(·|B) as a function on A is a probability satisfying the axioms. 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Conditional probability as probability and chain rule As an immediate consequence of the definition of conditional probability, we have the following chain rule. Theorem 9: For any events A1 , . . . , An ∈ A we have P(A1 ∩ · · · ∩ An ) = P(A1 )P(A2 |A1 ) . . . P(An |A1 . . . An−1 ) provided P(A1 . . . An−1 ) > 0. Example 19: A fruit basket contains 25 apples and oranges of which 20 are apples. If three fruits are randomly picked in a sequence, what is the probability that all three are apples? 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Conditional probability - chain rule Example 20: Let events A, B, and C be such that P(A) > 0, P(B) > 0, and P(C) > 0. Label the following statements as true or false: (i) The conditional probability P(A|B) can never exceed the unconditional probability P(A). (ii) If P(A|B) = P(A|C) then P(B) = P(C). (iii) If A and B are disjoint then P(A|A ∪ B) = P(A)/[P(A) + P(B)]. (iv) P(A|B) + P(Ac |B) = 1. (v) P(A|B) + P(A|B c ) = 1. 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Total probability formula Theorem 10: Let P(∪n Bn ) = 1 where {Bn } is finite or countable collection of mutually disjoint events. If P(Bn ) > 0 for all n then for A ∈ A X P(A) = P(A|Bn )P(Bn ). n Definition 15: The collection of sets {Bn } in the above theorem is called the partition of S. One can think of Bn ’s as events describing subpopulations and of P(A) as the weighted average, with weights P(Bn ), n = 1, 2, . . . . Example 21: An event W occurs with probability 0.4. If A occurs, then the probability of W is 0.6; if A does not occur but B occurs, the probability of W is 0.1. However, if neither A nor B occurs, the probability of W is 0.5. Finally, if A does not occur, the probability of B is 0.3. Find P(A). 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Bayes formula Sometimes it is not possible to calculate the conditional probability directly; other probabilities related to the probability in question are available Theorem 11: (Bayes) Under assumption of previous theorem and P(A) > 0 P(A|Bm )P(Bm ) P(Bm |A) = P n P(A|Bn )P(Bn ) when the partition {Bn } represents all possible mutually exclusive conditions that are logically possible, P(Bm ) and P(Bm |A) are often called prior and posterior probabilities of Bm . 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Bayes formula Example 22: Assume that 1% of the population has a certain disease (prevalence). A laboratory test is 98% effective if the person has the disease (sensitivity). However, the test also yields a “false positive” result for 0.5% of the healthy persons tested. What is the probability of correct diagnosis given that the test result is a) positive? b) negative? 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Independence of two events If P(A|B) = P(A) when P(B) > 0 then we say that A is independent of B. Definition 16: Two events A and B with P(A) > 0, P(B) > 0 are said to be independent if P(A|B) = P(A) or P(B|A) = P(B). Otherwise, A and B are dependent. Alternatively, A and B are said to be independent if P(AB) = P(A)P(B). Theorem 12: If A and B are independent, so are events A and B c , Ac and B, and Ac and B c . 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Mutual independence vs. pairwise independence Definition 17: We say that A1 , . . . , An are (mutually) independent if for any set of indices i1 , . . . , ik with 1 ≤ i1 < i2 < · · · < ik ≤ n we have P(Ai1 . . . Aik ) = P(Ai1 ) . . . P(Aik ). We say that A1 , A2 , . . . are independent if A1 , . . . , An are independent for any n ∈ N. Example 23: Set S = {s1 , s2 , s3 , s4 } with P(si ) = 1/4, i = 1, . . . , 4. Set A = {s1 , s2 }, B = {s1 , s3 }, C = {s1 , s4 }. Are A, B, C independent? Are they pairwise independent? Example 24: Set S = {s1 , s2 , s3 , s4 , s5 } with P(s1 ) = P(s2 ) = P(s3 ) = 8/27, P(s4 ) = 1/27, P(s5 ) = 2/27. Set A = {s1 , s4 }, B = {s2 , s4 }, C = {s3 , s4 }. Are A, B, C independent? Are they pairwise independent? 2013 Lectures Part 5 - Conditional Probability Statistics Conditional probability and independence Independence of events Theorem 13: If A1 , . . . , An are independent then also Ac1 , . . . , Acm , Am+1 , . . . , An are independent for any 0 < m ≤ n. Example 25: Label the statements true or false. (i) The target is to be hit at least once. In three independent shots at the target (instead of one shot) you triple the chances of attaining the goal (assume each shot has the same positive chance of hitting the target). (ii) If A and B are independent, then P(Ac |B c ) = 1 − P(A). (iii) If A and B are independent, then they must be disjoint. (iv) If A and B are independent, P(A) = P(B), and P(A ∪ B) = 1/2, then P(A) > 1/4. 2013 Lectures Part 5 - Conditional Probability Statistics