1 Algorithms CSCI 235, Fall 2012 Lecture 9 Probability.

Slides:



Advertisements
Similar presentations
Probability Probability Principles of EngineeringTM
Advertisements

Lecture Discrete Probability. 5.2 Recap Sample space: space of all possible outcomes. Event: subset of of S. p(s) : probability of element s of.
1 Press Ctrl-A ©G Dear2009 – Not to be sold/Free to use Tree Diagrams Stage 6 - Year 12 General Mathematic (HSC)
Probability. Experiment Something capable of replication under stable conditions. Example: Tossing a coin.
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
Counting Chapter 13 sec 1. Break up into groups One method of counting is using the tree diagram. ◦ It is useful to keep track of counting. ◦ Order of.
22C:19 Discrete Structures Discrete Probability Fall 2014 Sukumar Ghosh.
1 Counting Rules. 2 The probability of a specific event or outcome is a fraction. In the numerator we have the number of ways the specific event can occur.
Business Statistics: A Decision-Making Approach, 7e © 2008 Prentice-Hall, Inc. Chap 4-1 Business Statistics: A Decision-Making Approach 7 th Edition Chapter.
Combinations and Probability
Probability Probability Principles of EngineeringTM
1 Counting Rules. 2 The probability of a specific event or outcome is a fraction. In the numerator we have the number of ways the specific event can occur.
Class notes for ISE 201 San Jose State University
Counting Principles and Probability Digital Lesson.
Combinations & Permutations. Essentials: Permutations & Combinations (So that’s how we determine the number of possible samples!) Definitions: Permutation;
The Binomial Distribution Permutations: How many different pairs of two items are possible from these four letters: L, M. N, P. L,M L,N L,P M,L M,N M,P.
Chapter 3 Section 3.2 Basic Terms of Probability.
Probability Exercises. Experiment Something capable of replication under stable conditions. Example: Tossing a coin.
6.3Find Probabilities Using Combinations
Two way tables and tree diagrams
Probability The calculated likelihood that a given event will occur
The Big Picture: Counting events in a sample space allows us to calculate probabilities The key to calculating the probabilities of events is to count.
Lecture 1 Sec
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
22C:19 Discrete Structures Discrete Probability Spring 2014 Sukumar Ghosh.
Introduction to probability. Take out a sheet of paper and a coin (if you don’t have one I will give you one) Write your name on the sheet of paper. When.
(c) 2007 IUPUI SPEA K300 (4392) Probability Likelihood (chance) that an event occurs Classical interpretation of probability: all outcomes in the sample.
The Outwood Grange Family of Schools Let Me Count The Ways (teacher notes): 1. Obviously an important skill in problem solving is to be able to count the.
Mathematics Probability: Events Science and Mathematics Education Research Group Supported by UBC Teaching and Learning Enhancement Fund Department.
Counting Techniques Tree Diagram Multiplication Rule Permutations Combinations.
Discrete Math Section 16.3 Use the Binomial Probability theorem to find the probability of a given outcome on repeated independent trials. Flip a coin.
Math 145 September 18, Terminologies in Probability  Experiment – Any process that produces an outcome that cannot be predicted with certainty.
AP Statistics Intro to Probability: Sample Spaces and Counting.
Binomial Probability Theorem In a rainy season, there is 60% chance that it will rain on a particular day. What is the probability that there will exactly.
Math 1320 Chapter 7: Probability 7.1 Sample Spaces and Events.
10-3 Sample Spaces These are the notes that came with the teacher guide for the textbook we are using as a resource. These notes may be DIFFERENT than.
Chapter 6 Probability Mohamed Elhusseiny
Warm Up 1. A dog catches 8 out of 14 flying disks thrown. What is the experimental probability that it will catch the next one? 2. If Ted popped 8 balloons.
Section 5.1 Day 2.
Terminologies in Probability
first, we get a grasp of these darn coins!
Copyright © 2016, 2013, and 2010, Pearson Education, Inc.
Random Variables.
UNIT 8 Discrete Probability Distributions
Algorithms CSCI 235, Fall 2017 Lecture 10 Probability II
Math 145 September 25, 2006.
Counting Techniuqes.
EXAMPLE 1 Find a sample space
Basic Probability aft A RAJASEKHAR YADAV.
Probability.
Combinations & Permutations
Probability.
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
Chapter 9 Section 1 Probability Review.
Terminologies in Probability
Statistical Inference for Managers
Terminologies in Probability
Terminologies in Probability
Combinations & Permutations
Section Probability Models
Terminologies in Probability
©G Dear 2009 – Not to be sold/Free to use
Pascal’s Triangle By Marisa Eastwood.
Algorithms CSCI 235, Spring 2019 Lecture 10 Probability II
Math 145 June 26, 2007.
Terminologies in Probability
6.2 Probability Models.
Math 145 February 12, 2008.
Terminologies in Probability
Presentation transcript:

1 Algorithms CSCI 235, Fall 2012 Lecture 9 Probability

2 Permutations How many ways can you take k items from a set of n items? Order matters (ab is counted separately from ba) No duplicates allowed (don't count aa) Example: S = {a, b, c, d}, how many ways can we take 2 items? ab ac ad ba bc bd ca cb cd da db dc Total pairs = 12 4 ways to pick first 3 ways to pick second In general: The number of permutations of k items from a set of n is:

3 Combinations Combinations are like permutations, except order doesn't matter. ab and ba are considered the same. ab ac ad bc bdcd Combination of 4 things taken 2 at a time: Each set of k items has k! possible permutations. number of combinations = number of permutations divided by k!

4 k-tuples and k-selections k-tuple (or k-string): Like a permutation, but can have duplicates. aa ab ac ad ba bb bc bd ca cb cc cd da db dc dd n choices for 1st item n choices for 2nd item, etc. Total possible k-tuples for k items taken from a group of n items is n k k-selection: Like combination, but can have duplicates. aa ab ac ad bb bc bd cc cd dd Formula:

5 Sample Spaces A sample space is the set of all possible outcomes for an experiment. Experiment A: flip 3 coins Sample space = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT} # of possibilities: ? Experiment B: Flip a coin until you get heads. Sample space = {H, TH, TTH, TTTH,...} 2323

6 Diagramming sample spaces Experiment A: (flip 3 coins)

7 Diagramming sample spaces Experiment A: (flip 3 coins) H3H1H2H3T3H1H2T3H3H1T2H3T3H1T2T3H3T1H2H3T3T1H2T3H3T1T2H3T3T1T2T3H3H1H2H3T3H1H2T3H3H1T2H3T3H1T2T3H3T1H2H3T3T1H2T3H3T1T2H3T3T1T2T3 T1T1 T2T2 H2H2 T2T2 H2H2 H1H1 Experiment B: (flip until heads) Sample space (the set of all possible outcomes)

8 Diagramming sample spaces Experiment A: (flip 3 coins) H3H1H2H3T3H1H2T3H3H1T2H3T3H1T2T3H3T1H2H3T3T1H2T3H3T1T2H3T3T1T2T3H3H1H2H3T3H1H2T3H3H1T2H3T3H1T2T3H3T1H2H3T3T1H2T3H3T1T2H3T3T1T2T3 T1T1 T2T2 H2H2 T2T2 H2H2 H1H1 Experiment B: (flip until heads) H 1 T 1 H 2 T 1 T 2 H 3 T 1 T 2 T 3 H 4 H 1 H 2 H 3 H 4 T 1 T 2 T 3 T 4... Sample space (the set of all possible outcomes)...

9 Events An event is a subset of the sample space: Experiment A (flip 3 coins): Event A1: First flip is head = {HHH, HHT, HTH, HTT} Event A2: Second flip is tail = {HTH, HTT, TTH, TTT} Event A3: Exactly 2 tails = {HTT, THT, TTH} Event A4: Two consecutive flips are the same= {HHH, HHT, HTT, THH, TTH, TTT} Experiment B (flip until get heads): Event B1: First flip is head = {H} Event B2: First flip is tail = {TH, TTH, TTTH...} Event B3: Even number of flips = {TH, TTTH, TTTTTH...}

10 Definitions If A and B are events in sample space S, then "A and B" is translated "A or B" is translated "not A" is translated Two events are mutually exclusive if

11 Examples 1. Of the four events in Experiment A, which pairs are mutually exclusive? 2. Of the three events in Experiment B, which pairs are mutually exclusive?

12 Recall events An event is a subset of the sample space: Experiment A (flip 3 coins): Event A1: First flip is head = {HHH, HHT, HTH, HTT} Event A2: Second flip is tail = {HTH, HTT, TTH, TTT} Event A3: Exactly 2 tails = {HTT, THT, TTH} Event A4: Two consecutive flips are the same= {HHH, HHT, HTT, THH, TTH, TTT} Experiment B (flip until get heads): Event B1: First flip is head = {H} Event B2: First flip is tail = {TH, TTH, TTTH...} Event B3: Even number of flips = {TH, TTTH, TTTTTH}

13 Probability Distribution A probability distribution Pr{ } on sample space S is any mapping from events of S to [0...1] such that the following axioms hold: 1) Pr{A} >= 0 for any event A 2) Pr{S} = 1 Example: Flip two coins: S= {HH, HT, TH, TT} Event A = {HT}Event B = {TH} What is

14 Some useful theorems Example: Flip two coins. Event A = {HH, HT, TH} Event B = {HT, TH, TT} What is

15 Working with probability trees If events at distinct stages of a probability tree are independent, then the probability of a leaf is the product of the probabilities on the path to the leaf. Experiment A (flip 3 weighted coins): H 1 =1/3, T 1 = 2/3; H 2 =1/4, T 2 =3/4; H 3 =1/5, T 3 = 4/5

16 Working with probability trees If events at distinct stages of a probability tree are independent, then the probability of a leaf is the product of the probabilities on the path to the leaf. H3H1H2H3T3H1H2T3H3H1T2H3T3H1T2T3H3T1H2H3T3T1H2T3H3T1T2H3T3T1T2T3H3H1H2H3T3H1H2T3H3H1T2H3T3H1T2T3H3T1H2H3T3T1H2T3H3T1T2H3T3T1T2T3 T1T1 T2T2 H2H2 T2T2 H2H2 H1H1 Experiment A (flip 3 weighted coins): H 1 =1/3, T 1 = 2/3; H 2 =1/4, T 2 =3/4; H 3 =1/5, T 3 = 4/5 (1/3)(1/4)(1/5) = 1/60 (1/3)(1/4)(4/5) = 4/60 = 1/15 (1/3)(3/4)(1/5) = 3/60 = 1/20 (1/3)(3/4)(4/5) = 12/60 = 1/5 (2/3)(1/4)(1/5) = 2/60 = 1/30 (2/3)(1/4)(4/5) = 8/60 = 2/15 (2/3)(3/4)(1/5) = 6/60 = 1/10 (2/3)(3/4)(4/5) = 24/60 = 2/5

17 Another example Experiment B (flip a weighted coin until heads): H i = 1/3, T i = 2/3 H 1 T 1 H 2 T 1 T 2 H 3 T 1 T 2 T 3 H 4 H 1 H 2 H 3 H 4 T 1 T 2 T 3 T /3 (2/3)(1/3) = 2/9 (2/3)(2/3)(1/3) = 4/27 (2/3)(2/3)(2/3)(1/3) = 8/81 Probability of S =1/3 + 2/9 + 4/27 + 8/ =