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
CHAPTER 6 PROBABILITY How can the likelihood of an event be measured? CHANCE EXPERIMENTS AND EVENTS 6-1 What is a chance experiment and how can those chances be represented? Chance Experiment—any activity where the outcome has two or more possibilities Sample Space—the set of all possible outcomes Tree Diagram—one method of finding the sample space that shows/details all the outcomes EXAMPLE Show all possible outcome for the situation: a woman and a man walk into a sport equipment store. Each one could buy a tennis racket, a soccer ball or a Frisbee. Tennis racket Soccer ball man woman Frisbee Tennis racket Soccer ball Frisbee Set notation— (event1, event2, . . . ) Event—any collection of outcomes from the sample space of a chance experiment Simple event—consists of exactly one outcome from the sample space The complement of an event A—all the outcomes that are not in A Noted as A’, Ac , or A A or B—something which is in the sample space of A or the sample space of B AUB (A union B) A and B—something which is in the intersection of the sample space of A and of B A B (A intersect B) Disjoint or mutually exclusive events—two events that have no common outcomes VENN DIAGRAMS Shaded area represents the indicated statement A or B A and B Disjoint Events A’ Homework Pg 233-235 3, 4, 7, 10, 12 THE DEFINITION OF PROBABILITY What is probability? 6-2 Probability # of favorable outcomes P( E ) # of possible outcomes Called the classical approach and works well when you have a finite number of outcomes Law of Large Numbers (James Bernoulli) As the number of repetitions of a chance experiment increases the chance that the relative frequency of an event will differ from the true probability of the event by more than a small number approaches zero In English: The more trials you do for an experiment, the closer the rel. freq. you get will be to the true probability. Relative Frequency Approach # of times E occurs P( E ) # of trials Subjective Approach Personally assigned values which are not replicable not as much value is placed on these BASIC PROPERTIES OF PROBABILITY 6-3 What are the basic properties of probability? 1) For any event E 0≤p(E)≤1 2) If S is the sample space for an experiment then P(S) = 1 3) If two events are disjoint, P(E or F) = P(E) +P(F) 4) For any event E P(E) + P(not E) = 1 P(E) =1 – P(not E) or P(not E) = 1- P(E) Homework P 248-251 evens CONDITIONAL PROBABILITY 6-4 What is conditional probability and how can it be found? Conditional Probability occurs when the likelihood that one event will occur is changed by what has happened previously. EXAMPLE There is a disease that effects .1% of the population. A test to determine if you have the disease exists. The test can give a false positive 20% of the time. IF E= the individual has the disease F= the individual tested positive for the disease What is P(E)=.001=.1% P(E|F)=.8=80% The probability of E given that F occurred The occurrence of E is unlikely in the general population however knowing that the test is positive it is very likely that you have the disease. Conditional Probability Formula: P( E and F) P( E F ) P( E | F ) P(F) P( F ) Read the probability of E given F Hint: intersection = multiplication union = addition Example Consider the population to be all families with two children. Assuming that there is an equal chance of having a boy or a girl there are 4 possible outcomes. GG, BB, GB, BG (ordered by age) 1) What is the probability of choosing a family with two girls given the family has at least one girl? 2) What is the probability that they have 2 girls given that the oldest is a girl? EXAMPLE In 1912, the titanic sank. Almost 1500 people died, most of them men. Was that because a man was less likely to survive than a woman or because men outnumbered women 3 to 1? Female Survival Rate p(S|F) Titanic Survival Data: Male Female Totals Survived 367 344 711 Died 1364 126 1490 totals 1731 470 2201 surviving female 344 73% female 470 Male Survival Rate P(S|M) surviving male 367 21% male 1731 Overall Survival Rate P(S|on the ship) survived 711 32% on the ship 2201 Lore is likely to be correct. Women and children first! Homework pg. 258-260 even INDEPENDENCE 6-5 What are independent events and how are their probabilities found? Independent events have no bearing on each other even if you know the outcome of the 1st event P(E|F) = P(E) this also implies P(not E|F) = P(not E) P(E| not F) = P(E) P(not E|not F) = P(not E) Basically logical Probability of 2 independent events occurring follows from: P( E F ) P( E | F ) P( F ) Cross multiply: P( E F ) P( E | F ) P( F ) But if E and F are Independent P(E|F) = P(E) we substitute to find P( E F ) P( E ) P( F ) Replacement—not removing a selection from the population (look at it and put it back). What is the probability of getting a red marble on the second try given that you had 5 red and 5green marbles in the bag and replaced the first marble after choosing it. Without Replacement—removing the selection from the population once it is selected. What is the probability of getting a red marble on the second try given that you had 5 red and 5green marbles in the bag and did not replace the first marble after choosing it. Homework Pg 267-270 36 – 52 even and Pg 259 #33 SOME GENERAL PROBABILITY RULES 6-6 What are some basic or general probability rules? THE UNION OF EVENTS: P(A U B) = P(A) + P(B) – P(A ∩ B) Inclusive—events that share some solutions 0≤P(A∩B)≤1 Mutually exclusive events do not have any overlap P(A∩B)=0 REMEMBER: P(E∩F)=P(E|F)P(F) if they are independent but =P(E)P(F) Law of Total Probability if B1, B2, …, Bn are disjoint events with P(E∩B1) + P(E∩B2) + … + P(E∩Bn) = 1 then P(E) = 1 P(E) = P(E|B1)P(B1) +P(E|B2)P(B2) + … + P(E|Bn)P(Bn) Baye’s Rule if the items are disjoint and you want the probability of P(B1|E) but have P(E|B1) P( B1 E ) P( E B1 ) P( E ) P( E ) Knowing P(B1 | E ) And P( E B1 ) P(E | B1 ) P( E ) Or P(B1 )P(E | B1 ) P( E B1 ) Then by substitution: P(B1|E) = P(B1)P(E|B1) P(E|B1)P(B1) +P(E|B2)P(B2) + … + P(E|Bn)P(Bn) Example pg 279 #6.27 Two shipping services offer overnight delivery of parcels, and both promise delivery before 10AM. A mail-order catalog company ships 30% of its overnight packages using shipping service 1 and 70% using service 2. Service 1 fails to meet the 10AM delivery promise 10% of the time, whereas service 2 fails to deliver by 10 AM 8% of the time. Suppose you made a purchase from this company and were expecting your package by 10 AM but it is late. Which service is more likely to have been used—ie who should you call to see where your important package is? S1 = service 1 S2 = service 2 L = late We know P(S1) = .3 P(S2) = .7 P(L|S1) = .1 P(L|S2) = .08 Since you know the package is late you need to find P(S1|L) and P(S2|L) P( S1 | L) P( L | S1 ) P( S1 ) (.1)(. 3) .03 .3488 P( L | S1 ) P( S1 ) P( L | S 2 ) P( S 2 ) (.1)(. 3) (.08)(. 7) .086 P ( S 2 | L) P( L | S 2 ) P( S 2 ) (.08)(.7) .056 .6512 P( L | S1 ) P( S1 ) P( L | S 2 ) P( S 2 ) (.1)(.3) (.08)(.7) .086 So you should call service two to see where the package is because even though they have a lower overall percentage rate (.08), they have 70% of the company’s business so 65% of the late packages from this company are from service 2. (it’s a lot of math this time, but if you are constantly having to call it would be beneficial to know who to call first and save time overall by only making 1 call 65% of the time) Homework pg 280-282 even ESTIMATING PROBABILITIES EMPIRICALLY AND USING SIMULATIONS 6-7 How do you accurately estimate probabilities? Simulation provides a method of estimating probabilities that we do not have the time or resources to determine analytically and are not practical to observe or estimate empirically. Simulation generates “observations” by performing an experiment that is as similar as possible in structure to the real situation. EXAMPLE: A professor wants to simulate the possible scores on a 20 question true/false quiz when the students are guessing. Rather than finding 500 students to write down 20 answers and then scoring each paper. You could place 20 balls 10 red/10 blue in a box, allow blue to represent true, make a selection, replace the ball and repeat 20 times “per quiz”, record the # of corrects. Repeat 1000 times and construct a table of probability. Why 20 balls with 10 of each? to make it random but equally likely to pick either color OR You could use a random number table allowing evens to be correct and odds incorrect break the table into groups of 20 and count the number of corrects in each. Homework pg 291 – 294 even Review Pg. 295 – 297 even and 81