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
M. Bremer Math 161A - Spring 2017 Probability Theory Probability is the study of randomness. In this course you will learn how to build mathematical models that can take uncertainty into account. The origins of probability theory lie in the 16th and 17th century (P. de Fermat, B. Pascal) and were based mostly on the analysis of games of chance. Modern probability theory which is based on the mathematical foundation of measure theory began in the 19th century with A.N. Kolmogorov and P.S. Laplace. Vocabulary: Experiment: an action or process whose outcome is subject to uncertainty. Example: Rolling a die. Sample Space: denoted S is the set of all possible outcomes of the experiment. Example: Write down the sample spaces for the experiments “rolling a die” and “tossing a coin”. Event: a subset of outcomes from the sample space. A simple event consists of only one outcome from the sample space S. Example: Write down the outcome “rolling an even number” in set notation. Write down the simple event “tossing heads”. Set Theory Remark: You can draw pictures of sets, so called Venn Diagrams, that show the relationship between the sets. The following picture shows sets A and B such that A is (literally) contained in B. A B Definition: The complement of an event A, denoted by A0 , is the set of all outcomes in S that are not in A. B A Ω Definition: The union of two events A and B, denoted by A ∪ B (read: “A or B”), is the set of all outcomes contained in either A or B (or both). Definition: The intersection of two events A and B, denoted A ∩ B (read “A and B”), is the set of all outcomes that are contained in both A and B. A B A B Definition: Two events A and B are called mutually exclusive or disjoint, if their intersection is empty. The empty set is denoty by ∅. 5 M. Bremer Math 161A - Spring 2017 Exercise: Draw Venn diagrams with two intersecting sets A and B and shade the area that represents: (a) A (b) (A ∩ B)0 (c) A0 ∩ B 0 What would the Venn diagrams above (and the shaded sets) look like if B were contained in A? Important: The set notation that will be used most in this course is the notation for intersection, union, and complement. Notation Symbol Meaning Intersection ∩ “and” Union ∪ “or” 0 Complement (·) “not” There are laws for working with sets. De Morgan’s Laws: (A ∪ B)0 = A0 ∩ B 0 (A ∩ B)0 = A0 ∪ B 0 How can you see if a law such as the above is true? Draw two pictures of the sets A and B. In one picture shade the set described on the left side of the equation and in the other picture shade the set in the right side of the equation. If the shaded sets are the same, then the above equality holds. Exercise: Convince yourself that the first De Morgan’s law is true. A B A B It should be obvious that the following always hold: A ∪ A0 = S, A ∩ A0 = ∅ where ∅ is the “empty” set or “null event”. 6 M. Bremer Math 161A - Spring 2017 Example: If F is the event that a randomly chosen person if female, and S is the event that the person is single, then how would you describe the events that the randomly chosen person is (a) Married? (b) A married female? (c) A single male? Axioms of Probability An axiom is a primary assumption about something. Building up on axioms, a theory can be derived. The following are the underlying assumptions we make on probabilities. Axiom 1: For any event A, its probability is non-negative P (A) ≥ 0; Axiom 2: The probability of the whole sample space is equal to one P (S) = 1; Axiom 3: If A1 , A2 , A3 , . . . is a (finite or infinite) collection of disjoint events, then X P (A1 ∪ A2 ∪ A3 ∪ · · · ) = P (Ai ). From these axioms we can make some immediate conclusions: Proposition: Null event P (∅) = 0. Proof: Proposition: It is sometimes easier to compute the probability that something will not happen P (A0 ) = 1 − P (A) Proof: Proposition: If the events A and B are mutually exclusive, then P (A ∪ B) = P (A) + P (B) Proof: 7 M. Bremer Math 161A - Spring 2017 Proposition: If A ⊂ B, then P (A) ≤ P (B). In particular, P (A) ≤ 1 for every event A. Proof: Proposition: For any two events A and B (not necessarily mututally exclusive) we have P (A ∪ B) = P (A) + P (B) − P (A ∩ B) Proof: Proposition: For three events A, B, C, the general addition rule looks like this P (A∪B∪C) = P (A)+P (B)+P (C)−P (A∩B)−P (A∩C)−P (B∩C)+P (A∩B∩C) Proof: Example: According to Current Population Reports, published by the U.S. Bureau of Census, 51.0% of U.S. adults are female, 7.1% are divorced, and 4.1% are divorced females. Determine the probability that a randomly selected adult in the U.S. is (a) Male (b) Female, but not divorced (c) A divorced male Example: Consider randomly selecting a student at San Jose State and define the events I = the student owns an iPod, and C = the student owns a cell phone. Suppose that P (I) = 0.6, P (C) = 0.8 and P (I ∩ C) = 0.55. (a) Determine the probability that a randomly chosen student owns either an iPod or a cell phone. (b) Determine the probability that a randomly chosen student owns an iPod, but not a cell phone. 8 M. Bremer Math 161A - Spring 2017 Counting Techniques If you have a sample space S in which each outcome is equally likely, then computing probabilities of events reduces to counting the number of ways an event can occur. Let N denote the number of events in the sample space and N (A) the number of outcomes contained in event A, then P (A) = N (A) . N This means we count in how many ways A can occur (numerator, “favorables”) and divide by the number of possible outcomes of the experiments (denominator, “possibles”). Example: The experiment “rolling a die” has N = 6 possible outcomes. The event “rolling an even number” has three favorable outcomes. Hence P (even) = Example: A box contains three marbles, one blue, one green, and one red. We draw two marbles (a) with replacement (that means, we draw one, look at it, put it back and draw the next one) (b) without replacement (that means we draw two at the same time) Write down the sample space for each case. What is the probability of the event E “one is red and one is green”? 9 M. Bremer Math 161A - Spring 2017 Unfortunately, even seemingly simple experiments can have very many possible outcomes. That makes listing all outcomes impractical. In this leture we will take a closer look at Combinatorics which is the mathematical theory of “counting”. Examples: • There are 2,598,960 different ways to deal a poker hand (5 cards out of a 52 card deck). • There are 1024 ways to flip a coin ten times. • There are 13,983,816 ways to select 6 out of 49 lottery numbers (and only one Jackpot winning combination!) Example: Mr. Smith owns 3 suit jackets, 4 ties, and 3 pairs of pants. How many different outfits can he wear? If one jacket, 2 of the ties and 2 pairs of pants are blue, what is the probability that he ends up with an all-blue outfit? Theorem: General Product Rule Suppose a set consists of ordered collections of k elements (k-tuples) and that there are n1 possible choices for the first element, n2 choices for the second element, etc., and nk choices for the k th element. Then there are n1 n2 · · · nk possible k-tuples. Example: The Birthday problem revisited. What is the probability that in a group of n people at least two people share a Birthday? 10 M. Bremer Math 161A - Spring 2017 Fact: A set of n elements has 2n subsets. (Each element can either be included or excluded in the subset → n actions with 2 possible outcomes each.) Permutations and Combinations In many applications it makes a difference if the order of elements matters or not. Here are some examples: Order matters in: • License plates, Codes, Phone numbers. • People sitting down at a table, etc. • Order does not matter in • Poker hands, committees of people. • Drawing coins out of a purse when all you are interested in is the sum of money you get, etc. • Definition: An ordered subset is called a Permutation. The number of permutations of size k that can be formed from the n individuals or objects in a group will be denoted by Pk,n . Example: Find Pk,n for a password made up out of four different letters. Definition: An unordered subset is called a Combination. One way to denote the number of combinations is Ck,n , but we will use the notation nk (read: “n choose k”) instead. Example: Find Ck,n for a poker hand: Order matters → Permutations Order does not matter → Combinations Example: You have a box with 10 different cookies and 3 hungry kids. In how many different ways can you give each kid a cookie? 11 M. Bremer Math 161A - Spring 2017 Proposition: Permutation Rule The number of possible permutations of k objects chosen from a set of n objects is n! Pk,n = . (n − k)! Fact: Pn,n = n! is the number of ways to order n distinct objects. Example: Five kids will randomly sit down on 5 chairs in a row. In how many ways is that possible? Jim and Joe are friends. What is the probability that they’ll sit next to each other? Example: Eight ballots in a ballot box are numbered 1, . . . , 8. In how many ways can we draw three ballots without replacement? Proposition: Combination Rule The number of possible combinations of k objects chosen from a set of n possible objects is n Pk,n n! Ck,n = = = . k! (n − k)!k! k Note: There are “!”, Pk,n , and Ck,n buttons on most calculators. If you cannot locate yours, make sure to ask somebody (your instructor, for instance). 12 M. Bremer Math 161A - Spring 2017 Practice Problems Example: How many different letter arrangements can be formed using the letters P EP P ER One possibility would be e.g. REP P P E (it does not need to be an english word). Proposition: There are m! m1 ! · · · mk ! different permutations of m objects of which m1 , . . . , mk are alike, respectively. Example: In how many ways can the letters CALIF ORN IA be arranged? What is the probability that in a random arrangement the two I’s end up next to each other? Example: In how many ways can a committee of 2 teachers and 4 students be chosen from 10 teachers and 20 students? Example: What is the probability to have at least one ace in a poker hand? A poker hand consists of 5 cards randomly drawn from a standard 52-card deck. Remark: There is often more than one way of looking at (and solving) a particular problem. If you compare your solution with that of a friend you may both have used different reasoning, and different theorems. But you should end up with the same probability! The same is true for the homework or review problems. Just because the way you did the problem is different from the one printed in the solutions does not mean you did it the wrong way (as long as your answer is correct). 13 M. Bremer Math 161A - Spring 2017 Mixed Examples on Counting problems Remark: For students who are not used to this new way of thinking, it can sometimes be hard to distinguish between the different rules. Which one applies to which problem? There is no definite answer to this question. A good approach is to imagine yourself having to do the “experiment”. When you want to count the possible outcomes, keep very close track of all the decisions you have to make and apply the product rule. Another rule of thumb: Choosing with replacement → Order matters → Permutations Choosing without replacement → Order does not matter → Combinations Example: A fair coin is flipped ten times. What is the probability to see exactly five heads in the ten tosses? Example: What is the probability to be dealt a poker hand that has two kings? Example: If four fair dice are tossed, what is the probability that they will all show different faces? Example: A team of four bridge players is to be chosen from 10 players. Two of the players hate each other and refuse to serve on the team together. How many different team formations are possible? Example: What is the probability to win the jackpot in the lottery “6 out of 49”? 14