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
STAB22 Statistics I Lecture 14 1 Venn Diagrams Sample Space Events Method for representing events graphically Sample space (S): rectangle Outcomes: points in S Events: areas in rectangle B A Outcomes Example: Roll of a die Event A = {5 ,6 } = = “Roll ≥ 5” 1 2 3 4 5 6 Event A 2 Composite Events Given events A and B, form new events as: A or B (union, also denoted A U B) A and B (intersection, also denoted A ∩ B) Either event A, or event B, or both occur Both events A & B occur simultaneously not A (complement, also denoted AC) Event A does not occur 3 Composite Events Union: A or B Either event occurs Intersection: A and B AUB Both events occur A B A∩B Complement: AC Event A does not occur A AC 4 Disjoint Events Events are called disjoint (or mutually exclusive), if they have no outcomes in common (i.e. cannot occur simultaneously) Disjoint (no overlap) A B Not disjoint A B E.g. Which of the events: A, A∩B, AC are always disjoint? 5 Example Random phenomenon: flipping 2 coins List outcomes in sample space: S = List outcomes in each event A = “1st flip is H” = B = “2nd flip is T” = AUB A∩B AC 6 Probabilities Probabilities can be assigned to events based on: Past experience (empirical probability) Model (theoretical probability) E.g. if 5% of microchips produced by a machine are defective, then P(“microchip defective”) = 0.05 E.g. for fair coin, P(Heads)=1/2 Subjective belief (personal probability) E.g. I believe my favorite team has 30% probability of winning Stanley Cup 7 Probability Rules 1. 2. 3. No matter how probabilities are assigned, they must satisfy the following three rules: Probability of any event is between 0 and 1: 0 ≤ P(A) ≤ 1, for any event A Probability of all outcomes is 1 P(S) = 1, where S= sample space For two disjoint events A & B: P(A or B) = P(A) + P(B) 8 Example Roll fair 6-sided die Sample space S = {1, 2, 3, 4, 5, 6} Each outcome has equal probability 1/6 Find probability of A=“roll 1 or 2” Find probability of B=“roll even number” 9 Complement Rule Probability of AC can be found from that of A using complement rule: PA C 1 P A A AC Why? Are events A and AC mutually exclusive? What is the union A or AC What is the probability of A or AC 10 General Addition Rule For any events A, B A B P A or B P A P B P A and B If events A, B are disjoint A B P A and B 0 (no overlap) P A or B P A P B 11 Example Find probability that a card chosen at random from a standard deck of cards will be either a king or a heart? 12 Example Shop accepts either AmEx or VISA credit cards. A total of 24% of its customers carry AmEx, 61% carry VISA, and 11% carry both. What percentage of its customers, carry a card that the shop accepts? 13 Example Weather forecaster predicts following probabilities for tomorrow’s weather: P(sun) = .6, P(temp < 0°C) = .4, and P(sun and temp < 0°C) = .5 Are these valid probs? 14 Conditional Probability Conditional Probability: probability of event A, given that event B has occurred Denoted by P(A | B) (vertical bar read as “given”) Probability of A, if all of the possible outcomes are restricted only to the ones in B 1 3 5 4 2 Condition on event B 2 4 6 6 reduced sample space B A∩B B A S 15 Conditional Probability Conditional probability given by formula P A and B P A | B P B Example: Roll of a die Let A = {3, 4} and B = {2, 4, 6} P(A | B) is prob of {3, 4} given roll is even Find P(A | B) 16 Example Consider contingency table of law school applicants: Male Female total Accept Reject total 20 25 5 30 75 45 35 65 100 Define events: M=male, F=female, A=accept, & R=reject; and find the following (empirical) probs P(M) = ● P(F) = ● P(A) = ● P(R) = P(A and M) = ● P(A and F) = P(A | M) = P(A | F) = P(M | A) = 17