* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Chapter 7
Survey
Document related concepts
Transcript
Chapter 7 Probability • • • • • • 7.1 Experiments, Sample Spaces, and Events 7.2 Definition of Probability 7.3 Rules of Probability 7.4 Use of Counting Techniques in Probability 7.5 Conditional Probability and Independent Events 7.6 Bayes’ Theorem Section 7.1 Experiments, Sample Spaces, and Events An experiment is an activity with observable results (called outcomes). A sample point is an outcome of an experiment. The sample space is the set of all possible sample points. An event is a subset of a sample space. Ex. Rolling a die Outcomes: landing with a 1, 2, 3, 4, 5, or 6 face up. Sample Space: S ={1, 2, 3, 4, 5, 6} Events: , {1}, {2}, {3}, {4}, {5}, {6}, S Impossible event Certain event Ex. An experiment consists of spinning the hand on the disk below two times. Find the sample space. C P W Events The union of events A and B is the event A B. The intersection of events A and B is the event A B. The complement of event A is the event AC. Ex. Rolling a die. S = {1, 2, 3, 4, 5, 6} Let A = {1, 2, 3} and B = {1, 3, 5} A B {1, 2,3,5} A B {1,3} A BC {2} Events A and B are mutually exclusive if A B . Ex. When rolling a die, if event A = {2, 4, 6} (evens) and event B = {1, 3, 5} (odds), then A and B are mutually exclusive. Ex. When drawing a single card from a standard deck of cards, if event A = {heart, diamond} (red) and event B = {spade, club} (black), then A and B are mutually exclusive. Section 7.2 Definition of Probability The probability of an event occurring is a measure of the proportion of the time that the event will occur in the long run. Suppose that in n trials an event E occurs m times. The relative frequency of the event E is m/n. If the relative frequency approaches some value P(E) as n becomes larger, then P(E) is called the empirical probability of E. Ex. The table below represents the frequency of certain types of license plates observed by a family on a recent trip. Find the probability distribution. State Number Probability Wisconsin 45 45/150 = 0.300 Illinois 80 80/150 = 0.533 Iowa 20 20/150 = 0.133 Indiana 5 5/150 = 0.033 Notice 150 total observations Let S = {s1, s2, s3,…,sn} where each si represents a simple event (all mutually exclusive) and let P(si) represent the probability of event si. The function P, which assigns a probability to each simple event is called a probability function. Also P(si) has the following properties: 0 P( si ) 1 probabilities are between 0 and 1 P( s1 ) P( s2 ) ... P( sn ) 1 P(si ) P(s j ) P si s j Sum of the probabilities is 1 Probabilities of the union is the sum of their probabilities Probability of an Event in a Uniform Sample Space If S = {s1, s2, … , sn} is the sample space for an experiment in which the outcomes are equally likely, then we assign the probabilities P( s1 ) P( s2 ) P( sn ) to each of the outcomes s1, s2, … , sn. 1 n Ex. Assume that when rolling a die each face is equally likely to show up. If event E = {2} then since S = {1, 2, 3, 4, 5, 6}, we have P(E) = 1/6. That is, the probability of rolling a 2 is 1 in 6. Similarly, the probability of rolling any face number is 1/6. Finding the Probability of an Event E 1. Determine a sample space S associated with the experiment. 2. Assign probabilities to the simple events of S. 3. If E = {s1, s2, s3,…,sn} (each a simple event) then P(E) = P(s1) + P(s2) +…+ P(sn). If E is the empty set then P(E) = 0. Ex. An experiment consists of spinning the hand on the disk below one time. Assume each outcome is equally likely. A C W Find P(C) and then find P C W . Applied Example: Rolling Dice • A pair of fair dice is rolled. • Calculate the probability that the two dice show the same number. • Calculate the probability that the sum of the numbers of the two dice is 6. Applied Example 3, page 365 Section 7.3 Rules of Probability Properties of the Probability Function Property 1 Property 2 P( E ) 0 for any E P( S ) 1 If E and F are mutually exclusive (E F = Ø), then Property 3 P( E F ) P( E ) P( F ) Ex. A local grocery store has found kept track of the amount of money spent by its customers on a single visit. Find the probability that if a customer is selected at random, the amount spent by the customer will be a. More than $150 = 0.15 b. More than $50 but less than or equal to $200 Dollars spent Probability x 200 0.05 150 x 200 0.10 100 x 150 0.15 50 x 100 x 50 0.25 0.45 = 0.50 Property 4 Addition Rule If E and F are any two events of an experiment, then P( E F ) P( E ) P( F ) P( E F ) Subtract overlap E F Note: If E and F are mutually exclusive, then P( E F ) 0 Ex. A card is drawn from a well-shuffled deck of 52 playing cards. What is the probability that it is a king or a heart? Property 5 Rule of Complements If E is an event of an experiment and EC denotes the complement of E, then P E C 1 P( E ) Ex. A card is drawn from a well-shuffled deck of 52 playing cards. What is the probability that it is not a king? K = pick a king, P K C 1 P( K ) 1 P( K ) 4 52 48 12 4 52 52 13 Section 7.4 Use of Counting Techniques in Probability Computing the Probability of an Event in a Uniform Sample Space Let S be a uniform sample space and let E be any event. Then number of favorable outcomes in E n E PE number of possible outcomes in S nS Ex. Suppose that you reach into a box of 12 size AA batteries and you know that 4 of them are dead. Find the probability that Ex. Three balls are selected at random without replacement from the jar below. Find the probability that Ex. Refer to the jar of marbles below. Two marbles are drawn at random without replacement. Section 7.5 Conditional Probability and Independent Events The probability of an event is affected by the knowledge of other information relevant to the event. Notation: P(A|B) is read “the probability of event A given that event B has occurred.” Ex. You roll a fair die. Find the probability that you roll a 2 given that your roll is an even. Knowing it is even restricts the sample space to {2, 4, 6}. So P 2 | even 1 3 Conditional Probability of an Event If A and B are events in an experiment and P( A) 0, then the conditional probability that the event B will occur given that A has already occurred is P B | A P A B P A Which can be written (the Product Rule): P A B P A P B | A Ex. In a box of 20 size AA batteries, 10 are brand X and 10 are brand Y. You also know that 3 of the brand X batteries are dead, while 2 of the brand Y are dead. Find the probability that in a (random) draw Independent Events If A and B are independent events, then P B | A P( B) P( A | B) P( A) Test for Independent Events Events A and B are independent events if and only if P A B P( A)P(B) Note: this generalizes to more than two independent events. Ex. If A die is rolled twice, show that rolling a 5 on the first roll and rolling a 4 on the second roll are independent events. Section 7.6 Bayes’ Theorem Bayes’ Theorem Let A1, A2, …, An be a partition of a sample space S and let E be an event of the experiment such that P(E) is not zero. Then the posteriori probability P(Ai|E) is given by P Ai | E P Ai P E | Ai P A1 P E | A1 P A2 P E | A2 ... P An P E | An Where 1 i n Posteriori probability: probability is calculated after the outcomes of the experiment have occurred. Ex. A store stocks light bulbs from three suppliers. Suppliers A, B, and C supply 10%, 20%, and 70% of the bulbs respectively. It has been determined that company A’s bulbs are 1% defective while company B’s are 3% defective and company C’s are 4% defective. If a bulb is selected at random and found to be defective, what is the probability that it came from supplier B?