# Chapter 2.pdf - Chapter 2 Probability I calculated the...

• 42

This preview shows page 1 out of 42 pages. Unformatted text preview: Chapter 2: Probability I calculated the probability of me passing the class and the answer I got was “banana”… Things do not look good. 1 2.1 Sample spaces and events Experiment (in a wide sense): Any activity whose outcome is subject to uncertainty. • E.g.: Coin toss, roll dice, life span of equipment, number of errors when compiling a program for the first time, counting white blood cells, obtaining blood type. Sample space of an experiment is the set of all possible outcomes of the experiment • 1 coin toss = {, } • White blood cell count = [0, ] • # errors when compiling a program = 0, 1, 2, 3, … , +∞ Events: An event is a collection (subset) of outcomes. An event is a simple event if it is a single outcome, and a compound event if it consists of more than one outcomes. 2 2.1 Sample spaces and events Example (1): A fuse could be defective (D) or not defective (N). We examine 3 fuses. What are the possible outcomes? = {, , , , , , , } (8 outcomes) • Event : The first fuse is defective, the other two are not. = {} • Event : There is exactly 1 defective fuse. = {, , } • Event : There are at least 2 defective fuses. = {, , , } Infinite number of outcomes = infinite number of simple events = infinite number of events 3 2.1 Sample spaces and events Example (2): Compiling a program Event : At most 3 errors. Event : An even number of errors. = {0,1, 2, 3} = {0, 2, 4, 6, … } SET THEORY 1. Complement of an event is the set of all outcomes in that are not in . Denoted by ′ or . 2. Union of events , ( ∪ , “ or ”) is the event consisting of all outcomes that are either in or in , or in both. 3. Intersection of events , ( ∩ , “ and ”) is the event consisting of outcomes that are both in and in . 4 2.1 Sample spaces and events Example (3): A factory has 6 production lines in total. The number of product lines that are operational at any given time varies (is subject to uncertainty). Sample space = 0, 1, 2, 3, 4, 5, 6 Event = 0, 1, 2, 3, 4 Event = 3, 4, 5, 6 Event = 1, 3, 5 Then: • • • • • • ′ = ∪ = ∪ = ∩ = ∩ = ( ∩ )′ = 5 2.1 Sample spaces and events Venn diagrams (graphical representation of set theory concepts) ∅ null event (no outcome/empty event) • If ∩ = ∅, then and are called mutually exclusive or disjoint events • Simple events are always disjoint 6 2.2 Axioms, interpretations and properties of probabilities Event → () ≡ The likelihood that will occur (Probability of ) Axioms 1. ≥ 0 2. = 1 3. If 1 , 2 , … an infinite collection of disjoint events, then ∞ 1 ∪ 2 ∪ ⋯ = ራ =1 ∞ = ෍ =1 7 2.2 Axioms, interpretations and properties of probabilities Proposition ∅ =0 Proof: From Axiom 3. If = ∅ for all , then ∞ ∅ ∪ ∅∪ ⋯ = ∅ = ෍ ∅ → ∅ = 0 =1 Proposition: If disjoint ‫=ڂ‬1 = σ=1 Proof: From Axiom 3. Set = ∅ for all > , then ራ =1 ∞ ∞ ∞ ∞ = ራ = ෍ = ෍ + ෍ = ෍ + ෍ ∅ = ෍ =1 =1 =1 =+1 =1 =+1 =1 8 2.2 Axioms, interpretations and properties of probabilities Example: Coin toss = {, } =∪ = ∪ = 1 → + = 1 → = 1 − () Proposition ′ = 1 − () Proof: = ∪ ′ → = ∪ ′ = 1 → + ′ = 1 → ′ = 1 − () 9 2.2 Axioms, interpretations and properties of probabilities Example: Accidents in a factory Shift Day Night Human error 10% 13% Reason Equipment malfunction 35% 42% = {, , , } with = 0.1, = 0.13, = 0.35, = 0.42 ℎ = ℎ ℎ = 10 2.2 Axioms, interpretations and properties of probabilities Interpreting probabilities Assume an experiment that is performed times under identical conditions. • : an event • (): the number of times occurred. • ()/ is the relative frequency of occurrence of For “small” , the value ()/ will “fluctuate” As gets “large” (going to infinity – “on the long run”) ()/ will converge to a single value ≡ () E.g. (a given machine will malfunction during this year) = 0.1 → 10% of ALL the machines of such type will malfunction Objective vs subjective interpretation of probability (does “long run” really exist?) 11 2.2 Axioms, interpretations and properties of probabilities Probability properties Events and . Then ∪ = + − ( ∩ ) Proof: ∪ = + ∩ ′ = + − ∩ + − ( ∩ ) = 12 2.2 Axioms, interpretations and properties of probabilities Probability properties ∪∪ = = + + − ∩ − ∩ − ∩ + ∩∩ ∪∪∪ =⋯ 13 2.2 Axioms, interpretations and properties of probabilities Probability properties ∪ ∩ = ∩ + ∩ − ∩∩ 14 2.2 Axioms, interpretations and properties of probabilities Determining probabilities systematically • Sample space with simple events 1 , 2 , 3 , … • are disjoint and σ∞ =1 = 1 An event can be represented as = ራ then = σ ∈ 15 2.2 Axioms, interpretations and properties of probabilities Example: Finite number () and equally likely outcomes , = 1,2, … , , with = =1 =1 1 = ෍ = ෍ = = 1 → = An event is the union of () in number equally likely to happen simple events (outcomes). Then 1 # = ෍ = ෍ = = ∈ ∈ 16 2.2 Axioms, interpretations and properties of probabilities NOTE: You can think of probabilities as the areas in the Venn diagrams over the total area of the sample space = NOTE: Oftentimes it is very useful to think of probabilities as percentages. ((ℎ ℎ)= percentage of people that have black hair) 17 2.3 Counting techniques Estimating probabilities for equally likely outcomes is quite straightforward. The difficulty lies in counting the number of favorable outcomes (here is where counting techniques come useful) Product rule for ordered pairs (, ) ≠ (, ) In an ordered pair (, ) where there are 1 possibilities for and 2 possibilities for , the number of pairs is 1 ∗ 2 . Product rule for tuples An ordered pair of objects is called a -tuple If there are possibilities (choices) for the -th object in a -tuple, then there are 1 ∗ 2 ∗ ⋯ ∗ possible -tuples. (This is a generalization of the case of ordered pairs) 18 2.3 Counting techniques Tree diagrams 1 , 2 , 3 , 4 “treatments”, 1 , 2 , 3 “populations”. = 4 ∗ 3 = 12 pairs 19 2.3 Counting techniques Permutations and Combinations There are individuals. I want to select a subset of size . Question: Does the order of selection matter? Yes – ordered subset: Permutations. # of permutations , No – unordered subset: Combinations. # of combinations , , or choose ” “ 20 2.3 Counting techniques Example: : Selecting = 4 students out of = 40 Candidates: Yiannis, Hubert, Carl, Bob, Katie,… Positions: President, Vice President, Treasurer, Secretary President Y H H … Vice president H Y Y … Treasurer C C C … Secretery B B K … How many possible sets do I have? There are 40 candidates for president. After the selection of the president I have 39 candidates for the VP, and so on. In total we have (product rule for tuples): 40 ∗ 39 ∗ 38 ∗ 37 sets • We can write this as: 40 ∗ 39 ∗ 38 ∗ 37 ∗ 36∗35∗34∗⋯∗2∗1 36∗35∗34∗⋯∗2∗1 = 40! 36! = 40! 40−4 ! 21 2.3 Counting techniques Permutations of objects by , ! = − ! Permutations of objects by : , = ! − ! , = Combinations of objects by : , = = , (we “group” different orderings together) , ! 0 ! = ! ! − ! ! ! = ! − ! 22 2.3 Counting techniques Example: 100 songs on my iPod. 10 of them are Beatles songs. I have my iPod on shuffle. What is the probability that the 5th song played is the 1st Beatles song? = Number of ways to select the first 5 songs: 100 ∗ 99 ∗ 98 ∗ 97 ∗ 96 = 5,100 Number of ways to select the first 4 songs if they are not Beatles songs: = 4,90 Number of ways to select the 5th song if it is a Beatles song: = 10 4,90 ∗ 10 90 ∗ 89 ∗ 88 ∗ 87 ∗ 10 = = = 0.06 5,100 100 ∗ 99 ∗ 98 ∗ 97 ∗ 96 23 2.3 Counting techniques Example: 15 Apple and 10 Dell computers are bought. 6 of them will be given to students. a) What is the probability that exactly 3 will be Apple? 3 =exactly 3 of the 6 are Apple Total # of outcomes: 25 6 # of favorable outcomes computers) = 177100 15 3 ∗ 10 3 3 = 54600 (the students get 3 Apple and 3 Dell 54600 = = 0.3083 177100 24 2.3 Counting techniques Example (cont.) b) What is the probability that at least 3 will be Apple? Define 4 , 5 , 6 similarly to 3 . Then: 3 = 3 ∪ 4 ∪ 5 ∪ 6 = NOTE: Oftentimes it is much easier to work with probabilities if we define them in the context of a “variable”. : number of Apple computers given to students 3 = = 3 , 3 = ( ≥ 3) 25 2.4 Conditional probability (|) The occurrence of an event may affect the probability of an event occurring : a person has a disease : the blood test was negative () vs. (|) Example: 2 assembly lines 1 , 2 1 produced 8 components with 2 being defective 2 produced 10 components with 1 being defective Line 1 Line 2 Defective 2 1 Not defective 6 9 We select one component randomly Event : line 1 component was selected Event : the component was defective ∩ = 8 = 0.44 18 3 () = = 0.17 18 2 = = 3 () = 2 18 0.66 26 2.4 Conditional probability (|) Conditional probability of , given that has occurred is: ∩ = as long as () ≠ 0. Note: ≠ Given that happened, the sample space has changed from to . So the probability of is now: ∩ ∩ / ∩ = = = / 27 2.4 Conditional probability Example: Probability of liking cats = 0.5 Probability of liking dogs = 0.6 Probability of liking cats AND dogs ∩ = 0.4 Then = 28 2.4 Conditional probability Example: = 0.14, = 0.23, = 0.37 ∩ = 0.08, ∩ = 0.09, ∩ = 0.13 ∩ ∩ = 0.05 (a) What is | ? ∩ 0.09 | = = = 0.2432 0.37 29 2.4 Conditional probability Example (cont.): b) What is | ∪ ? Hint: Define event = ∪ 30 2.4 Conditional probability Example (cont.): c) ∪ | = d) | ∪ ∪ = 31 2.4 Conditional probability (|) Multiplication rule for ∩ ∩ = = (|) Useful when events are different stages in succession 1 ∩ 2 ∩ 3 = 3 1 ∩ 2 )(1 ∩ 2 ) = 3 1 ∩ 2 )(2 |1 )(1 ) 32 2.4 Conditional probability Bayes’ Theorem preliminaries Exhaustive events: , = 1, … , : ‫=ڂ‬1 = Law of total probability If exhaustive and mutually exclusive events, then for any other event = 1 1 + 2 2 + ⋯ + = ෍ =1 = ෍ ( ∩ ) =1 33 2.4 Conditional probability Example: I have 3 email accounts (1 , 2 , 3 ) • 70% of my emails come to 1 . 1% of the emails in 1 are spam • 20% of my emails come to 2 . 2% of the emails in 2 are spam • 10% of my emails come to 3 . 5% of the emails in 3 are spam What is the probability that an email I get is spam? :{email in account }, : {email is spam} = 34 2.4 Conditional probability BAYES’ THEOREM , = 1, 2, … , exhaustive and mutually exclusive events. Then for any event ∩ | = = , () σ=1 = 1,2, … , • is the prior probability of event • | is the posterior probability of event (after taking into account the information of ) 35 2.4 Conditional probability Example (rare diseases): 1 in 1000 people has the exploding head syndrome. A company has developed a diagnostic test. We know that if an individual has the syndrome, a positive result on the test has probability 99%. If the individual does not have the syndrome, a positive result has probability 2%. What is the probability of someone having the syndrome if the results are positive? Events 1 = {an individual has the syndrome}, 2 = 1 ′, = {the diagnostic test gave a positive result} ℎ ℎ ℎ = 1 1 = 36 2.5 Independence Two events are independent if (|) = (). Otherwise they are dependent. • Also = ∩ () = () = ()() () = • Also, if and are independent, then and ′ are independent • Also, if and disjoint (mutually exclusive), then = (i.e. they are dependent). ∩ () = 0 = 0, • Also, if and are independent, then ∩ = = (multiplication rule for independent events) 37 2.5 Independence Examples: a) 2 dice rolls : { 1 ℎ } : { 5 ℎ } b) : { ℎ } : { ℎ } More than 2 events? Events , = 1,2, … , are mutually independent if for every = 2,3, … , , and every subset of indices 1 , 2 , … , 1 ∩ 2 ∩ ⋯ ∩ = 1 2 … 38 2.5 Independence Example: Consider the following system consisting of 2 subsystems (subsystem 1-2-3, subsystem 4-5-6). • Assume that for the system to work, at least one of the two subsystems should work. • Assume that each individual component works with the same probability of 0.9. • Assume that the individual components are independent. • What is the probability that the system works 39 2.5 Independence Example (cont.): Event : {component works}, with = 0.9 = = 1 ∩ 2 ∩ 3 ∪ 4 ∩ 5 ∩ 6 = 1 ∩ 2 ∩ 3 + 4 ∩ 5 ∩ 6 − 1 ∩ 2 ∩ 3 ∩ 4 ∩ 5 ∩ 6 =∗∗+∗∗−∗∗∗∗∗ = 0.93 + 0.93 − 0.96 = 0.927 (Conversely, if there was only one subsystem, the probability would be 0.93 = 0.73) 40 2.5 Independence Example: Assume that for the system to work, BOTH the subsystems should work. Event : {component works}, with = 0.9 = = 1 ∪ 2 ∩ 3 ∩ 4 41 2.5 Independence Example (cont.): Hint: 1 ∪ 2 ∩ 3 ∩ 4 = 1 ∪ 2 ∩ = 42 ...
View Full Document

• • • 