* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Chapter 1
Survey
Document related concepts
Transcript
Chapter 1. Random Events and Probability 1.1 Introduction The term Probability refers the study of randomness and uncertainty. In any situation in which one of a number of possible outcomes may occur, the theory of probability provides methods for quantifying the chances, or likelihoods, associated with the various outcomes. 。Tossing a properly balanced coin, it will fall with either a head or a tail showing. 。Measuring the diameters of ball bearing produced by a certain company, the possible outcomes contain all real numbers in a certain interval. Definition: A probability is a number between 0 and 1 representing how likely it is that an event will occur. Probabilities can be: 1. Frequentist (based on frequencies), 2. Subjective: probability represents a person’s degree of belief that an event will occur, e.g. I think there is an 80% chance it will rain today, written as P(rain) = 0.80. 1.2 Sample Spaces and Events 1 / 25 Definition: A random experiment is an experiment whose outcome is not known until it is observed. Definition: A sample space, Ω (or S), is the set of all possible outcomes of a random experiment. Definition: A sample point is an element of the sample space. Experiment: Toss a coin twice and observe the result. Sample space: Ω = {HH,HT, TH, TT} An example of a sample point is: HT Experiment: Toss a coin twice and count the number of heads. Sample space: Ω = {0, 1, 2} Experiment: Toss a coin twice and observe whether the two tosses are the same (e.g. HH or TT). Sample space: Ω = {same, different} Definition: An event is any collection (subset) of outcomes contained in the sample space. Events will be denoted by capital letters A,B,C,... . Note:We say that event A occurs if the outcome of the experiment is one of the elements in A. Definition: An event is said to be simple if it consists of exactly one outcome and compound if it consists of more than one outcome. 2 / 25 Example: Toss a coin twice. Sample space: Ω = {HH,HT, TH, TT} Let event A be the event that there is exactly one head. We write: A =“exactly one head” Then A = {HT, TH}. Note:A is a subset of Ω, as in the definition. We write A ⊂ Ω. Definition: Event A occurs if we observe an outcome that is a member of the set A. Note: Ω is a subset of itself, so Ω is an event. The empty set, φ = {}, is also a subset of Ω. This is called the empty set (or null event), or the event with no outcomes. Example: Experiment: throw 2 dice. Sample space: Ω = {(1, 1), (1, 2), . . . , (1, 6), (2, 1), (2, 2), . . . , (2, 6), . . . , (6, 6)} Event A = “sum of two faces is 5” = {(1, 4), (2, 3), (3, 2), (4, 1)} Example: Consider an experiment in which each of three automobiles taking a particular freeway exit turns Left(L) or right (R) at the end of the exit ramp. The eight possible outcomes that comprise the sample space are 3 / 25 LLL, RLL, LRL, LLR, LRR, RLR, RRL,and RRR. Thus, there are eight simple events, among which are E1={LLL} and E5={LRR}. Some compound events include A={RLL, LRL, LLR}=the event that exactly one of the three cars turns right B={LLL, RLL, LRL, LLR}=the event that at most one of the cars turns right C={LLL,RRR}=the event that all three cars turn in the same direction Suppose that when the experiment is performed, the outcome is LLL. Then the simple Event E1 has occurred and so also have the events B and C (but not A). Example when the number of pumps in use at each of two six-pump gas stations is observed, there are 49 possible outcomes, so there are E49={(6,6)}. 49 simple events: E1={(0,0)} ,E2= {(0,1)},… Examples of compound events are A={(0,0), (1,1), (2,2), (3,3), (4,4), (5,5),(6,6)} =the event that the number of pumps in use is the same for both B={(0,4), (1,3), (2,2), (3,1), (4,0)} =the event that the total number of pumps in use is four C={(0,0), (0,1), (1,0), (1,1)} =the event that at most one pump is in use at each station 4 / 25 1.3 Operations of Set Theory Definition: Let A and B be events on the same sample space Ω: so A ⊂ Ω and B ⊂ Ω. Definition: The complement of event A is written Ac (or A ), and is given by Experiment: Pick a person in this class at random. Sample space: Ω = {all people in class}. Let event A =“person is male” and event B =“person travelled by bike today”. Suppose I pick a male who did not travel by bike. Say whether the following events have occurred: 1)A 2) B 3) A 5) A ∪ B ={female 6) A ∩ B ={male and no biker } 7) A ∩ B ={male and biker } 4) B or bike rider or both} 5 / 25 did occur. 1)Yes 2) No 7) No 8) Yes. 3)No 4) Yes Chanllenge: Can you express Answer: A∩ B 5) No 6) Yes using only a ∪ sign? A ∩ B = ( A ∪ B). Venn diagrams are generally useful for up to 3 events, although they are not used to provide formal proofs. For more than 3 events, the diagram might not be able to represent all possible overlaps of events. (This was probably the case for our transport Venn diagram.) 6 / 25 Properties of union, intersection, and complement The following properties hold. Distributive laws: For any sets A, B, and C: 7 / 25 Definition: Two events A and B are mutually exclusive, or disjoint, if This means events A and B cannot happen together. If A happens, it excludes B from happening, and vice-versa. Note: Does this mean that A and B are independent? No, quite the opposite. A EXCLUDES B from happening, so B depends strongly on whether or not A happens. Definition: Any number of events A1 , A2 , , An are mutually exclusive if every pair of the events is mutually exclusive: ie. Definition: A partition of the sample space Ω is a collection of mutually exclusive events whose union is Ω. 8 / 25 . form a partition of A. We will see that this is very useful forfinding the probability of event A. This is because it is often easier to find the probability of small ‘chunks’ of A (the partitioned sections) than tofind the whole probability of A at once. The partition idea shows us how to add the probabilities of these chunks together: see later. 9 / 25 1.4 Axioms, Interpretations, and properties of Probability Given an experiment and a sample space, the objective of probability is to assign to each event A a number P(A),called the probability of the event A, which will give a precise measure of the chance that A will occur. To ensure that the probability assignment will be consistent with our intuitive notions of probability, all assignments should satisfy the following axioms (basic properties) of probability. Definition: A probability P is a rule (function) which assigns a positive number to each event, and which satisfies the following axioms: As a direct consequence of the axioms we have the following properties for P. 10 / 25 Theorem Let A and B be events. Then, 6. If A1 , A2 , , An are n arbitrary events in Ω, then n P(= Ai ) n ∑ P( A ) − ∑ i 1 1 i == 7. If A1 , A2 , , An events i 1≤i < j ≤ n P( Ai Aj ) + ∑ 1≤i < j < k ≤ n P ( Ai Aj Ak ) − + (−1) n −1 P( A1 An ) is a finite sequence of mutually exclusive inΩ ( Ai A j = Φ , i ≠ j ), then Examples of basic probability calculations Example. A die is loaded in such a way that the number 1 is twice as likely to occur as other numbers. Find the probability of the event E that a number less than 3 occurs in a single toss. Solution. The sample space is S={1,2,3,4,5,6}, by the assumption, P(2),P(3),…,P(6) are equal and P(1)=2P(2). Since the sum of P(1),P(2),…,P(6) is 1, so we have P(1)=2/7, P(2)=P(3)=…=P(6)=1/7 . Thus, P(E)=P(1)+P(2)=3/7. 11 / 25 Example. 300 Australians were asked about their car preferences in 1998. Of the respondents, 33% had children. The respondents were asked what sort of car they would like if they could choose any car at all. 13% of respondents had children and chose a large car. 12% of respondents did not have children and chose a large car. Find the probability that a randomly chosen respondent: (a) would choose a large car; (b) either has children or would choose a large car (or both). First formulate events: Next write down all the information given: (a) Asked for P(L). (b) Asked for P(L∪C). 12 / 25 Respondents were also asked their opinions on car reliability and fuel consumption. 84% of respondents considered reliability to be of high importance, while 40% considered fuel consumption to be of high importance. Formulate events: R = “considers reliability of high importance”, F = “considers fuel consumption of high importance”. Information given: P(R) = 0.84, P(F) = 0.40. (c) P( R) = 1 − P( R) = 1 − 0.84 = 0.16 (d) We can not calculate P(R∩F) from the information given. (e) Given the further information that 12% of respondents considered neither reliability nor fuel consumption to be of high importance, find P(R∪F) and P(R∩F). 13 / 25 Probability that respondent considers either reliability or fuel consumption, or both, of high importance. Probability that respondent considers BOTH reliability AND fuel consumption of high importance. Example. (Student Enrollment) Among a group of 200 students, 137 students are enrolled in a mathematics class, 50 students are enrolled in a history class, and 124 students are enrolled in a music class. Furthermore, the number of students enrolled in both the mathematics and history classes is 33, the number enrolled in both the history and music classes is 29, and the number enrolled in both the mathematics and music classes is 92. Finally, the number of students enrolled in all three classes is 18. We shall determine the probability that a student selected at random from the group of 200 students will be enrolled in at least one of the three classes. Solution. Let A1 denote the event that the selected student is enrolled in the mathematics class, A2 denote the event that the selected student is enrolled in the history class, 14 / 25 A3 denote the event that the selected student is enrolled in the music class. To solve the problem, we must determine the value of P( A1 ∪ A2 ∪ A3 ) . From the given numbers, 137 50 124 , P( A2 ) = , P ( A3 ) = , 200 200 200 33 29 92 , P ( A2 ∩ A3 ) = , P ( A1 ∩ A3 ) = , P ( A1 ∩ A2 ) = 200 200 200 18 , P ( A1 ∩ A2 ∩ A3 ) = 200 P( A1 ) = It follows from Property (6), 6. If A1 , A2 , , An n P(= Ai ) are n arbitrary events in Ω, then n ∑ P( A ) − ∑ i 1 1 i == i 1≤i < j ≤ n P( Ai Aj ) + ∑ 1≤i < j < k ≤ n P ( Ai Aj Ak ) − + (−1) n −1 P( A1 An ) P ( A1 ∪ A2 ∪ A3 ) = P( A1 ) + P ( A2 ) + P ( A3 ) − P ( A1 ∩ A2 ) − P ( A2 ∩ A3 ) − P ( A1 ∩ A3 ) + P ( A1 ∩ A2 ∩ A3 ) = 175 / 200 = 7 / 8 1.5 Probabilities from combinatorics: equally likely outcomes Sometimes, all the outcomes in a discrete finite sample space are equally likely. This makes it easy to calculate probabilities. If 15 / 25 Example: For a 3-child family, possible outcomes from oldest to youngest are: Let { p1 , p2 , , p8 } be a probability distribution on Ω. If every baby is equally likely to be a boy or a girl, then all of the 8 outcomes in Ω are equally likely, so p=1 p= = p= 2 8 1 . 8 Event A contains 4 of the 8 equally likely outcomes, so event A occurs with probability P( A)= 4 1 = . 8 2 Counting equally likely outcomes The number of permutations, n Pr , is the number of ways of selecting r objects from n distinct objects when different orderings constitute different choices. The number of combinations, n Cr , is the number of ways of selecting r objects from n distinct objects when different 16 / 25 orderings constitute the same choice. Then Use the same rule on the numerator and the denominator When P( A) = # outcomes in A , # outcomes in Ω we can often think about the problem either with different orderings constituting different choices, or with different orderings constituting the same choice. The critical thing is to use the same rule for both numerator and denominator. Example: (a) Tom has five elderly great-aunts who live together in a tiny bungalow. They insist on each receiving separate Christmas cards, and threaten to disinherit Tom if he sends two of them the same picture. Tom has Christmas cards with 12 different designs. In how many different ways can he select 5 different designs from the 12 designs available? Order of cards is not important, so use combinations. Number of ways of selecting 5 distinct designs from 12 is b) The next year, Tom buys a pack of 40 Christmas cards, featuring 10 different pictures with 4 cards of each picture. He selects 5 cards at random to send to his great-aunts. What is the probability that at least two of the great-aunts receive the same picture? 17 / 25 Total number of outcomes is (Note: order mattered above, so we need order to matter here too.) So Thus P(A)=P(at least 2 cards are the same design) 1 − 0.392 = 0.608. = 1 − P ( A) = Example: What is the probability p that at least two people in a group of k people ( k ≤ 365 ) will have the same birthday, that is, will have been born on the same day of the same month but not necessarily in the same year. Solution. (We assume that the birthdays of the k people are unrelated (in particular, we assume that twins are not present) and that each of the 365 days of the year is equally likely to be the birthday of any person in the group. In particular, we ignore the fact that the birth rate actually varies during the year and we assume that anyone actually born on February 29 will consider his birthday to be another day, such as March 1.) Since there are 365 possible birthdays for each of k people, the sample space S will contain 365k outcomes (all of which will be equally probable). The number of outcomes in S for which all k birthdays will be different is P365, k (since the first person’s birthday could be any one of the 365 days, the second person’s birthday could then be any of the other 364 days, and so on. ) 18 / 25 Hence , the probability that all k persons will have different birthdays is P365, k 365k . The probability p that at least two of the people will have the same birthday is p =1− P365, k 365 k =1− (365)! . (365 − k )!365k Numerical values of this probability p for various values of k are given in the following table. The probability p that at least two people in a group of k people will have the same birthday k p 5 0.027 10 0.117 15 0.253 20 0.411 22 0.476 23 0.507 25 0.569 30 0.706 40 0.891 50 0.970 60 0.994 The calculation in this example illustrates a common technique for solving probability problems. If one wishes to compute the probability of some event A, it might be more straightforward to calculate P(AC) and then use the fact that P(A)=1- P(AC). This idea is particularly useful when the event A is of the form “at least n things happen” where n is small compared to how many things could happen. Example. Tossing a Coin. Suppose that a fair coin is to be tossed 10 times, and it is desired to determine (a) the probability p of obtaining exactly three heads and (b) the probability p’ of obtaining three or fewer heads. Solution. The total possible number of different sequences of 10 heads and tails is 210. (it may be assumed that each of these sequences is equally probable.) The number of these sequences that contains exactly three heads will be equal to the number of different arrangements that can be formed with three heads and seven tails. Here are some of those arrangements: HHHTTTTTTT HHTHTTTTTT HHTTHTTTTT TTHTHTHTTT, etc. Each such arrangement is equivalent to a choice of where to put the 3heads among the 19 / 25 10 10 tosses, so there are such arrangements. The probability of obtaining exactly 3 three heads is then 10 3 p = 10 = 0.1172. 2 (b) using the same reasoning as in part (a), the number of sequences in the sample space that contain exactly k heads (k=0,1,2,3) is 10 . Hence , the probability of obtaining three heads or fewer k heads is 10 10 10 10 + + + 0 1 2 3 1 + 10 + 45 + 120 176 p ' = 10 = = 10 = 0.1719 . 2 210 2 Example. (Sampling without replacement.) Suppose that a class contains 15 boys and 30 girls, and that 10 students are to be selected at random for a special assignment. We shall determine the probability p that exactly three boys will be selected. Solution. The number of different combinations of the 45 students that might be 45 obtained in the sample of 10 students is , the statement that the 10 students are 10 45 selected at random means that each of these possible combinations is equally 10 probable. Therefore, we must find the number of these combinations that contain exactly three boys and seven girls. When a combination of three boys and seven girls is formed, the number of different combinations in which three boys can be selected from the 15 available boys is 15 , and the number of different combinations in which seven girls can be selected 3 30 from the 30 available girls is . Since each of these combinations of three boys 7 can be paired with each of the combinations of seven girls to form a distinct sample, 15 30 the number of combinations containing exactly three boys is . Therefore, 3 7 20 / 25 the desired probability is 15 30 3 7 p = 45 10 Example. (Playing Cards) Suppose that a deck of 52 cards containing four aces is shuffled thoroughly and the cards are then distributed among four player so that each player receives 13 cards. We shall determine the probability that each player will receive one ace. Solution. The number of possible different combinations of the four positions in the 52 deck occupied by the four aces is . If each player is to receive one ace, then there must 4 be exactly one ace among the 13 cards that the first player will receive and one ace among each of the remaining three groups of 13 cards that the other three players will receive. In other words, there are 13 possible positions for the ace that the first player is to receive, 13 other possible positions for the ace that the second player is to receive, and so on. Therefore, among the 52 possible combinations of the positions for the four aces, exactly 134 of these combinations 4 will lead to the desired result. Hence, the probability p that each player will receive one ace is p= 134 = 0.1055 52 4 Example. (Lottery Tickets) In a lottery game, six numbers from 1 to 30 are drawn at random from a bin without replacement, and each player buys a ticket with six different numbers from 1 to 30. If all six numbers drawn match those on the player’s ticket, the player wins. We assume that all possible draws are equally likely. One way to construct a sample space for the experiment of drawing the winning combination is to consider the possible sequences of draws. That is, each outcome consists of an ordered subset of six numbers chosen from the 30 available numbers. There are P30,6=30!/24! such outcomes. With this sample spaces S , we can calculate probabilities for events such as A={the draw contains the numbers 1,14,15,20,23, and 27} B={one of the numbers drawn is 15} C={the first number drawn is less than 10} P(A)= 6! 6!24! = = 0.00000168 , P30, 6 30! P(C)= 9 × P29,5 P30, 6 = P(B)= 6 × P29,5 P30, 6 = 6 = 0.2 30 3 = 0.3 10 21 / 25 1.6 Multinomial Coefficients We learn how to count the number of ways to partition a finite set into more than two disjoint subsets. The generalization is useful when outcomes consist of several parts selected from a fixed number of distinct types. We begin with a fairly simple example that will illustrate the general ideas of this section. Example. (Choosing Committees) Suppose that 20 members of an organization are to be divided into three committees A, B, C in such a way that each of the committees A and B is to have eight members and committee C is to have four members. We shall determine the number of different ways in which members can be assigned to these committees. Notice that each of the 20 members gets assigned to one and only one committee. Solution. To form committee A, we must choose eight out of 20 members , and this can be done in 20 ways. Then to split the remaining 12 members into committee B and C there are 8 12 ways to do it. Every choice of committee A can be paired with every one of the splits of the 8 remaining 12 members into committees B and C. Hence the number of assignments into three committees is the product of the numbers combinations for the two parts of the assignment, 20 12 20! 12! 20! = = = 62,355,150 8 8 8!12! 8!4! 8!8!4! In general, suppose that n distinct elements are to be divided into k different groups ( k ≥ 2 ) in such a way that, for j=1,2,…,k, the jth group contains exactly nj elements, where n1+ n2+…+ nk =n. It is desired to determine the number of different ways in which the n elements can be divided into the k groups. The n1 elements in the first group can be selected from the n available elements in n different ways. After the n1 elements in the first group have been selected, the n2 elements in n1 n − n1 different ways. the second group can be selected from the remaining n-n1 elements in n2 Hence, the total number of different ways of selecting the elements fro both the first group and the n n − n1 . It follows from the preceding explanation that, for each second group is n n 1 2 j=1,2…,k-2 after the first j groups have been formed, the number of different ways in which the nj+1 elements in the next group (j+1) can be selected from the remaining n-n1-…-nj elements is n − n1 − n j .After the elements of group k-1 have been selected, the remaining nk elements n j +1 22 / 25 must then form the last group. Hence, the total number of different ways of dividing the n elements into the k groups is n n − n1 n − n1 − n2 n − n1 − nk − 2 n! = , nk −1 n3 n1 n2 n1!n2 ! nk ! Where the last formula follows from writing the binomial coefficients in terms of factorials. Definition. The number (Multinomial Coefficients). n n! ,is called a multinomial , which we shall denote by n1!n2 ! nk ! n1 , n2 ,, nk coefficient. The name multinomial coefficient derives from the appearance of the symbol in the multinomial theorem. Theorem (Multinomial Theorem). For all numbers x1 , x2 , , xk and each positive integer n, n n1 n 2 x1 x2 xk nk , where the summation extends ( x1 + x2 + + xk ) n = ∑ n n n , , , k 1 2 over all possible combinations of nonnegative integers n1 , n2 , , nk such that n1 + n2 + + nk = n . Example. Choosing Committees. In above example, we see that the solution obtained there is the same as the multinomial coefficient fro which n=20, k=3, n1=n2=8 and n3=4, namely, 20 20! = = 62,355,150. 2 8,8,4 (8!) 4! . Example. Suppose that 12 dice are to be rolled. We shall determine the probability p that each of the six different numbers will appear twice. Solution. Each outcome in the sample space S can be regarded as an ordered sequence of 12 numbers, where the ith number in the sequence is the outcome of the ith roll. Hence, there will be 612 possible outcomes in S. The number of these 23 / 25 outcomes that would contain each of the six numbers 1, 2, .., 6 exactly twice will be equal to the number of different possible arrangements of these 12 elements. This number can be determined by evaluating the multinomial coefficient for which n=12, k=6, and n1=n2=…=n6=2. Hence the number of such outcomes is 12 12! 12! = , the required probability p is p= = 0.0034 . 6 (2!) 6 612 2,2,2,2,2,2 (2!) Example. A deck of 52 cards contains 13 hearts. Suppose that the cards are shuffled and distributed among four players A, B, C, and D so that each player receives 13 cards. We shall determine the probability p that player A will receive six hearts, player B will receive four hearts, player C will receive two hearts, and player D will receive one heart. Solution. The total number N of different ways in which the 52 cards can be distributed among the four players so that each player receives 13 cards is 52 52! = N = 4 13,13,13,13 (13!) We must now calculate the number M of ways of distributing the cards so that each player receives the required number of hearts. The number of different ways in which the hearts can be distributed to players A, B, C, and D so that the numbers of hearts they receive are 6, 4, 2, and 1, 13 13! = . 6,4,2,1 6!4!2!1! respectively, is Also, the number of different ways in which the other 39 cards can then be distributed to the four players so that each will have a total of 13 cards is 39 39! = . 7,9,11,12 7!9!11!12! 13! 39! ) Therefore, the required probability p is p == 6!4!2!1! 7!9!11!12! ( ( 52! ) (13!) 4 = 0.00196. There is another approach to this problem. The number of possible different combinations of the 24 / 25 52 . If player A is to receive six hearts, there 13 13 positions in the deck occupied by the hearts is 13 possible combinations of the six positions these hearts occpy among the 13 cards that 6 are 13 A will receive. Similarly, if player B is to receive four hearts, there are possible 4 13 possible 2 combinations of their positions among the 13 cards that B will receive. There are 13 possible combinations for player D. Hence, 1 combinations for player C, and there is 13 13 13 13 6 4 2 1 p = , 52 13 Which produces the same value as the one obtained by the first method of solution. Hw. P15/7,11 P21/1,3,7,11 P25/1,3,6,8 P32/1,3,5,7,9 P41/7,9,13,17 P45/1,3,7,9 P50/1,2,3,5,7, 25 / 25