Discrete Mathematics Lecture 8 Probability and Counting

Slides:



Advertisements
Similar presentations
Beginning Probability
Advertisements

Chapter 2 Probability. 2.1 Sample Spaces and Events.
COUNTING AND PROBABILITY
Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice,
Multiplication Rule. A tree structure is a useful tool for keeping systematic track of all possibilities in situations in which events happen in order.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
Discrete Mathematics Lecture 7 More Probability and Counting Harper Langston New York University.
Basics of Probability. Trial or Experiment Experiment - a process that results in a particular outcome or “event”. Simple event (or sample point), E i.
Discrete Mathematics Lecture 5
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
Counting Elements in a List How many integers in the list from 1 to 10? How many integers in the list from m to n? (assuming m
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Discrete Mathematics Lecture 7 Harper Langston New York University.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 2 Probability.
4. Counting 4.1 The Basic of Counting Basic Counting Principles Example 1 suppose that either a member of the faculty or a student in the department is.
Stochastic Methods A Review (Mostly). Relationship between Heuristic and Stochastic Methods  Heuristic and stochastic methods useful where –Problem does.
Probability – Models for random phenomena
Chapter 11: Counting Methods
Counting. Techniques for counting Rule 1 Suppose we carry out have a sets A 1, A 2, A 3, … and that any pair are mutually exclusive (i.e. A 1  A 2 =
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Discrete Mathematical Structures (Counting Principles)
Counting and Probability. Counting Elements of Sets Theorem. The Inclusion/Exclusion Rule for Two or Three Sets If A, B, and C are finite sets, then N(A.
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
Chapter 7 With Question/Answer Animations. Section 7.1.
CPSC 531: Probability Review1 CPSC 531:Probability & Statistics: Review Instructor: Anirban Mahanti Office: ICT Class.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
1 Lecture 4 (part 1) Combinatorics Reading: Epp Chp 6.
Chapter 6, Counting and Probability
Basic Probability Section 7.1. Definitions Sample Space: The set of all possible outcomes in a given experiment or situation Often denoted by S Event:
September1999 CMSC 203 / 0201 Fall 2002 Week #9 – 21/23/25 October 2002 Prof. Marie desJardins.
Computing Fundamentals 2 Lecture 6 Probability Lecturer: Patrick Browne
1 CHAPTERS 14 AND 15 (Intro Stats – 3 edition) PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.1,
Aaron Tan October Counting and Probability 1 IntroductionPossibility Trees and Multiplication RuleCounting Elements of Disjoint SetsThe Pigeonhole.
Rules of Probability. Recall: Axioms of Probability 1. P[E] ≥ P[S] = 1 3. Property 3 is called the additive rule for probability if E i ∩ E j =
MA 485/585 Probability Theory (Dr Chernov). Five cards Five cards are labeled 1,2,3,4,5. They are shuffled and lined up in an arbitrary order. How many.
ICS 253: Discrete Structures I Discrete Probability King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1.
Some other set notation We will use the notation to mean that e is an element of A. We will use the notation to mean that e is not an element of A.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Section 7.1. Probability of an Event We first define these key terms: An experiment is a procedure that yields one of a given set of possible outcomes.
Week 9 - Friday.  What did we talk about last time?  Partial orders  Total orders  Basic probability  Event  Sample space  Monty Hall  Multiplication.
Counting and Probability. Imagine tossing two coins and observing whether 0, 1, or 2 heads are obtained. Below are the results after 50 tosses Tossing.
Probability What is the probability of rolling “snake eyes” in one roll? What is the probability of rolling “yahtzee” in one roll?
PROBABILITY AND STATISTICS WEEK 2 Onur Doğan. Introduction to Probability The Classical Interpretation of Probability The Frequency Interpretation of.
Probability Models Section 6.2.
The Multiplication Rule
ICS 253: Discrete Structures I
What Is Probability?.
Probability Axioms and Formulas
Elementary Counting Techniques & Combinatorics
Probability Imagine tossing two coins and observing whether 0, 1, or 2 heads are obtained. It would be natural to guess that each of these events occurs.
Chapter 6 6.1/6.2 Probability Probability is the branch of mathematics that describes the pattern of chance outcomes.
PROBABILITY AND PROBABILITY RULES
What is Probability? Quantification of uncertainty.
9. Counting and Probability 1
9. Counting and Probability 1 Summary
COUNTING AND PROBABILITY
Probability Models Section 6.2.
PROBABILITY AND STATISTICS
COUNTING AND PROBABILITY
Welcome to the wonderful world of Probability
COUNTING AND PROBABILITY
Combination and Permutations Quiz!
COUNTING AND PROBABILITY
Discrete Structures Counting.
Agenda Lecture Content: Discrete Probability
Presentation transcript:

Discrete Mathematics Lecture 8 Probability and Counting Harper Langston New York University

Counting and Probability Coin tossing Random process Sample space is the set of all possible outcomes of a random process. An event is a subset of a sample space Probability of an event is the ratio between the number of outcomes that satisfy the event to the total number of possible outcomes P(E) = N(E)/N(S) for event E and sample space S Rolling a pair of dice and card deck as sample random processes

Possibility Trees Teams A and B are to play each other repeatedly until one wins two games in a row or a total three games. What is the probability that five games will be needed to determine the winner? Suppose there are 4 I/O units and 3 CPUs. In how many ways can I/Os and CPUs be attached to each other when there are no restrictions?

Multiplication Rule Multiplication rule: if an operation consists of k steps each of which can be performed in ni ways (i = 1, 2, …, k), then the entire operation can be performed in ni ways. Number of PINs Number of elements in a Cartesian product Number of PINs without repetition Number of Input/Output tables for a circuit with n input signals Number of iterations in nested loops

Multiplication Rule Three officers – a president, a treasurer and a secretary are to be chosen from four people: Alice, Bob, Cindy and Dan. Alice cannot be a president, Either Cindy or Dan must be a secretary. How many ways can the officers be chosen?

Permutations A permutation of a set of objects is an ordering of these objects The number of permutations of a set of n objects is n! (Examples) An r-permutation of a set of n elements is an ordered selection of r elements taken from a set of n elements: P(n, r) (Examples) P(n, r) = n! / (n – r)! Show that P(n, 2) + P(n, 1) = n2

Addition Rule If a finite set A is a union of k mutually disjoint sets A1, A2, …, Ak, then n(A) = n(Ai) Number of words of length no more than 3 Number of 3-digit integers divisible by 5

Difference Rule If A is a finite set and B is its subset, then n(A – B) = n(A) – n(B) How many PINS contain repeated symbols? So, P(Ac) = 1 – P(A) (Example for PINS) How many students are needed so that the probability of two of them having the same birthday equals 0.5?

Inclusion/Exclusion Rule 2 sets 3 sets N sets

Combinations An r-combination of a set of n elements is a subset of r elements: C(n, r) Permutation is an ordered selection, combination is an unordered selection Quantitative relationship between permutations and combinations: P(n, r) = C(n, r) * r! Permutations of a set with repeated elements Double counting

Team Selection Problems There are 12 people, 5 men and 7 women, to work on a project: How many 5-person teams can be chosen? If two people insist on working together (or not working at all), how many 5-person teams can be chosen? If two people insist on not working together, how many 5-person teams can be chosen? How many 5-person teams consist of 3 men and 2 women? How many 5-person teams contain at least 1 man? How many 5-person teams contain at most 1 man?

Poker Problems What is a probability to contain one pair? What is a probability to contain two pairs? What is a probability to contain a triple? What is a probability to contain royal flush? What is a probability to contain straight flush? What is a probability to contain straight? What is a probability to contain flush? What is a probability to contain full house?

Combinations with Repetition An r-combination with repetition allowed is an unordered selection of elements where some elements can be repeated The number of r-combinations with repetition allowed from a set of n elements is C(r + n –1, r) Soft drink example

Algebra of Combinations and Pascal’s Triangle The number of r-combinations from a set of n elements equals the number of (n – r)-combinations from the same set. Pascal’s triangle: C(n + 1, r) = C(n, r – 1) + C(n, r) C(n,r) = C(n,n-r)

Probability Axioms P(Ac) = 1 – P(A) P(A  B) = P(A) + P(B) – P(A  B) What if A and B mutually disjoint? (Then P(A  B) = 0)

Conditional Probability For events A and B in sample space S if P(A) ¹ 0, then the probability of B given A is: P(A | B) = P(A  B)/P(A) Example with Urn and Balls: - An urn contains 5 blue and

Conditional Probability Example An urn contains 5 blue and 7 gray balls. 2 are chosen at random. - What is the probability they are blue? - Probability first is not blue but second is? - Probability second ball is blue? - Probability at least one ball is blue? - Probability neither ball is blue?

Conditional Probability Extended Imagine one urn contains 3 blue and 4 gray balls and a second urn contains 5 blue and 3 gray balls Choose an urn randomly and then choose a ball. What is the probability that if the ball is blue that it came from the first urn?

Bayes’ Theorem Extended version of last example. If S, our sample space, is the union of n mutually disjoint events, B1, B2, …, Bn and A is an even in S with P(A) ¹ 0 and k is an integer between 1 and n, then: P(Bk | A) = P(A | Bk) * P(Bk) . P(A | B1)*P(B1) + … + P(A | Bn)*P(Bn) Application: Medical Tests (false positives, etc.)

Independent Events If A and B are independent events, P(A  B) = P(A)*P(B) If C is also independent of A and B P(A  B  C) = P(A)*P(B)*P(C) Difference from Conditional Probability can be seen via Russian Roulette example.