Discrete Probability CSC-2259 Discrete Structures Konstantin Busch - LSU1.

Slides:



Advertisements
Similar presentations
Beginning Probability
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.
Lecture Discrete Probability. 5.3 Bayes’ Theorem We have seen that the following holds: We can write one conditional probability in terms of the.
Discrete Probability Chapter 7.
Chapter 2 Concepts of Prob. Theory
Lecture (7) Random Variables and Distribution Functions.
Chapter 6 Probability and Simulation
Chapter 6: Probability : The Study of Randomness “We figured the odds as best we could, and then we rolled the dice.” US President Jimmy Carter June 10,
Probability Fall 2011, CISC1400 Dr. Zhang.
March 31, 2015Applied Discrete Mathematics Week 8: Advanced Counting 1 Discrete Probability Example I: A die is biased so that the number 3 appears twice.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.3 Binomial and Geometric Random Variables.
CSC-2259 Discrete Structures
22C:19 Discrete Structures Discrete Probability Fall 2014 Sukumar Ghosh.
Lec 18 Nov 12 Probability – definitions and simulation.
1 Discrete Math CS 280 Prof. Bart Selman Module Probability --- Part a) Introduction.
Probability Distributions
1 Copyright M.R.K. Krishna Rao 2003 Chapter 5. Discrete Probability Everything you have learned about counting constitutes the basis for computing the.
1 Section 5.1 Discrete Probability. 2 LaPlace’s definition of probability Number of successful outcomes divided by the number of possible outcomes This.
Probability and combinatorics Notes from Virtual Laboratories in Probability and Statistics.
Binomial & Geometric Random Variables
Review of Probability and Binomial Distributions
Quiz 4  Probability Distributions. 1. In families of three children what is the mean number of girls (assuming P(girl)=0.500)? a) 1 b) 1.5 c) 2 d) 2.5.
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.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Combinatorics.
5.1 Basic Probability Ideas
1 9/8/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
1 9/23/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Lecture Discrete Probability. 5.1 Probabilities Important in study of complexity of algorithms. Modeling the uncertain world: information, data.
PROBABILITY AND STATISTICS FOR ENGINEERING Hossein Sameti Department of Computer Engineering Sharif University of Technology Independence and Bernoulli.
Section 7.1. Section Summary Finite Probability Probabilities of Complements and Unions of Events Probabilistic Reasoning.
Probability Theory 1.Basic concepts 2.Probability 3.Permutations 4.Combinations.
Chapter 7 With Question/Answer Animations. Section 7.1.
Section 7.2. Section Summary Assigning Probabilities Probabilities of Complements and Unions of Events Conditional Probability Independence Bernoulli.
You probability wonder what we’re going to do next!
CSE 321 Discrete Structures Winter 2008 Lecture 19 Probability Theory TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Binomial Experiment A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties:
Chapter 16 Probability. Activity Rock-Paper-Scissors Shoot Tournament 1)Pair up and choose one person to be person A and the other person B. 2)Play 9.
Independence and Bernoulli Trials. Sharif University of Technology 2 Independence  A, B independent implies: are also independent. Proof for independence.
22C:19 Discrete Structures Discrete Probability Spring 2014 Sukumar Ghosh.
40S Applied Math Mr. Knight – Killarney School Slide 1 Unit: Statistics Lesson: ST-5 The Binomial Distribution The Binomial Distribution Learning Outcome.
ICS 253: Discrete Structures I Discrete Probability King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Conditional Probability Mass Function. Introduction P[A|B] is the probability of an event A, giving that we know that some other event B has occurred.
Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1.
Section 5.3 Independence and the Multiplication Rule.
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.
3/7/20161 Now it’s time to look at… Discrete Probability.
Section 6.3 Day 1 Binomial Distributions. A Gaggle of Girls Let’s use simulation to find the probability that a couple who has three children has all.
Binomial Distribution. Bernoulli Trials Repeated identical trials are called Bernoulli trials if: 1. There are two possible outcomes for each trial, denoted.
Probability Distributions. Constructing a Probability Distribution Definition: Consists of the values a random variable can assume and the corresponding.
Chapter 5 Discrete Probability Distributions 1. Chapter 5 Overview 2 Introduction  5-1 Probability Distributions  5-2 Mean, Variance, Standard Deviation,
13 Lesson 1 Let Me Count the Ways Fundamental Counting Principle, Permutations & Combinations CP Probability and Statistics FA 2014 S-ID.1S-CP.3S-CP.5.
Chapter 7. Section 7.1 Finite probability  In a lottery, players win a large prize when they pick four digits that match, in the correct order, four.
1 COMP2121 Discrete Mathematics Principle of Inclusion and Exclusion Probability Hubert Chan (Chapters 7.4, 7.5, 6) [O1 Abstract Concepts] [O3 Basic Analysis.
Probability Theory Basic concepts Probability Permutations
Introduction to Discrete Probability
Now it’s time to look at…
Introduction to Discrete Probability
ICS 253: Discrete Structures I
Chapter 6: Discrete Probability
CS104:Discrete Structures
Discrete Probability Distributions
Conditional Probability
Lesson Objectives At the end of the lesson, students can:
Discrete Probability Chapter 7 With Question/Answer Animations
Binomial & Geometric Random Variables
Now it’s time to look at…
Now it’s time to look at…
Now it’s time to look at…
Chapter 11 Probability.
Presentation transcript:

Discrete Probability CSC-2259 Discrete Structures Konstantin Busch - LSU1

Sample Space: Introduction to Discrete Probability 2 Unbiased die All possible outcomes

Konstantin Busch - LSU3 Experiment:procedure that yields events Event:any subset of sample space Throw die

Konstantin Busch - LSU4 Probability of event : Note that: since

What is the probability that a die brings 3? 5 Sample Space: Event Space: Probability:

What is the probability that a die brings 2 or 5? 6 Sample Space: Event Space: Probability:

7 Two unbiased dice Sample Space:36 possible outcomes First dieSecond die Ordered pair

What is the probability that two dice bring (1,1)? 8 Sample Space: Event Space: Probability:

What is the probability that two dice bring same numbers? 9 Sample Space: Event Space: Probability:

Konstantin Busch - LSU10 Player picks a set of 6 numbers (order is irrelevant) Game with unordered numbers Game authority selects a set of 6 winning numbers out of 40 What is the probability that a player wins? Number choices: 1,2,3,…,40 i.e. winning numbers: 4,7,16,25,33,39 i.e. player numbers: 8,13,16,23,33,40

Konstantin Busch - LSU11 Winning event: a single set with the 6 winning numbers Sample space:

Konstantin Busch - LSU12 Probability that player wins:

Konstantin Busch - LSU13 13 kinds of cards (2,3,4,5,6,7,8,9,10,a,k,q,j), each kind has 4 suits (h,d,c,s) Player is given hand with 4 cards A card game Deck has 52 cards What is the probability that the cards of the player are all of the same kind?

Konstantin Busch - LSU14 Event: Sample Space: each set of 4 cards is of same kind

Konstantin Busch - LSU15 Probability that hand has 4 same kind cards:

Konstantin Busch - LSU16 Game with ordered numbers Player picks a set of 5 numbers (order is important) Game authority selects from a bin 5 balls in some order labeled with numbers 1…50 Number choices: 1,2,3,…,50 i.e. winning numbers: 37,4,16,33,9 i.e. player numbers: 40,16,13,25,33 What is the probability that a player wins?

Konstantin Busch - LSU17 Sampling without replacement: 5-permutations of 50 ballsSample space size: After a ball is selected it is not returned to bin Probability of success:

Konstantin Busch - LSU18 Sampling with replacement: 5-permutations of 50 balls with repetition Sample space size: After a ball is selected it is returned to bin Probability of success:

Konstantin Busch - LSU19 Probability of Inverse: Proof: End of Proof

Konstantin Busch - LSU20 Example: What is the probability that a binary string of 8 bits contains at least one 0?

Konstantin Busch - LSU21 Probability of Union: Proof: End of Proof

Konstantin Busch - LSU22 Example: What is the probability that a binary string of 8 bits starts with 0 or ends with 11? Strings that start with 0: (all binary strings with 7 bits 0xxxxxxx) Strings that end with 11: (all binary strings with 6 bits xxxxxx11)

Konstantin Busch - LSU23 Strings that start with 0 and end with 11: (all binary strings with 5 bits 0xxxxx11) Strings that start with 0 or end with 11:

Probability Theory Konstantin Busch - LSU24 Sample space: Probability distribution function :

Konstantin Busch - LSU25 Notice that it can be: Example:Biased Coin Heads (H) with probability 2/3 Tails (T) with probability 1/3 Sample space:

Konstantin Busch - LSU26 Uniform probability distribution: Sample space: Example:Unbiased Coin Heads (H) or Tails (T) with probability 1/2

Konstantin Busch - LSU27 Probability of event : For uniform probability distribution:

Konstantin Busch - LSU28 Example:Biased die What is the probability that the die outcome is 2 or 6?

Konstantin Busch - LSU29 Combinations of Events: Complement: Union: Union of disjoint events:

Konstantin Busch - LSU30 Conditional Probability first coin is TailsCondition: Question: What is the probability that there is an odd number of Tails, given that first coin is Tails? Three tosses of an unbiased coin TailsHeadsTails

Konstantin Busch - LSU31 Sample space: Restricted sample space given condition: first coin is Tails

Konstantin Busch - LSU32 Event without condition: Event with condition: Odd number of Tails first coin is Tails

Konstantin Busch - LSU33 Given condition, the sample space changes to (the coin is unbiased)

Konstantin Busch - LSU34 Notation of event with condition: event given

Konstantin Busch - LSU35 Conditional probability definition: Given sample space with events and (where ) the conditional probability of given is: (for arbitrary probability distribution)

Konstantin Busch - LSU36 Example:What is probability that a family of two children has two boys given that one child is a boy Assume equal probability to have boy or girl Condition: one child is a boy Sample space:

Konstantin Busch - LSU37 Event: both children are boys Conditional probability of event:

Konstantin Busch - LSU38 Independent Events Events and are independent iff: Equivalent definition (if ):

Konstantin Busch - LSU39 Example:4 bit uniformly random strings : a string begins with 1 : a string contains even 1 Events and are independent

Konstantin Busch - LSU40 Bernoulli trial:Experiment with two outcomes: success or failure Success probability: Failure probability: Example: Biased Coin Success = Heads Failure = Tails

Konstantin Busch - LSU41 Independent Bernoulli trials: the outcomes of successive Bernoulli trials do not depend on each other Example:Successive coin tosses

Konstantin Busch - LSU42 Throw the biased coin 5 times What is the probability to have 3 heads? Heads probability: Tails probability: (success) (failure)

Konstantin Busch - LSU43 Total numbers of ways to arrange in sequence 5 coins with 3 heads: HHHTT HTHHT HTHTH THHTH

Konstantin Busch - LSU44 Probability that any particular sequence has 3 heads and 2 tails is specified positions: For example: HTHTH HTHHT HHHTT

Konstantin Busch - LSU45 Probability of having 3 heads: 1 st sequence success (3 heads) 2 nd sequence success (3 heads) sequence success (3 heads) st

Konstantin Busch - LSU46 Throw the biased coin 5 times Probability to have exactly 3 heads: All possible ways to arrange in sequence 5 coins with 3 heads Probability to have 3 heads and 2 tails in specified sequence positions

Konstantin Busch - LSU47 Theorem:Probability to have successes in independent Bernoulli trials: Also known as binomial probability distribution:

Konstantin Busch - LSU48 Proof: End of Proof Total number of sequences with successes and failures Probability that a sequence has successes and failures in specified positions Example: SFSFFS…SSF

Konstantin Busch - LSU49 Example: Random uniform binary strings probability for 0 bit is 0.9 probability for 1 bit is 0.1 What is probability of 8 bit 0s out of 10 bits? i.e

Konstantin Busch - LSU50 Birthday Problem Birthday collision: two people have birthday in same day How many people should be in a room so that the probability of birthday collision is at least ½? Problem: Assumption: equal probability to be born in any day

Konstantin Busch - LSU51 If the number of people is 367 or more then birthday collision is guaranteed by pigeonhole principle 366 days in a year Assume that we have people

Konstantin Busch - LSU52 :probability that people have all different birthdays We will compute :probability that there is a birthday collision among people It will helps us to get

Konstantin Busch - LSU53 1 st person’s Birthday choices Sample space: 2 nd person’s Birthday choices n th person’s Birthday choices Cartesian product Sample space size:

Konstantin Busch - LSU54 Event set:each person’s birthday is different 1 st person’s birthday 2 nd person’s birthday n th person’s birthday Sample size: #choices

Konstantin Busch - LSU55 Probability of no birthday collision Probability of birthday collision:

Konstantin Busch - LSU56 Probability of birthday collision: Therefore: people have probability at least ½ of birthday collision

Konstantin Busch - LSU57 The birthday problem analysis can be used to determine appropriate hash table sizes that minimize collisions Hash function collision:

Konstantin Busch - LSU58 Monte Carlo algorithms Randomized algorithms: algorithms with randomized choices (Example: quicksort) Monte Carlo algorithms: randomized algorithms whose output is correct with some probability (may produce wrong output)

Konstantin Busch - LSU59 Primality_Test( ) { for( to ) { if (Miller_Test( ) == failure) return(false) // n is not prime } return(true) // most likely n is prime }

Konstantin Busch - LSU60 Miller_Test( ) { for ( to ) { if ( or ) return(success) } return(failure) }

Konstantin Busch - LSU61 A prime number passes the Miller test for every A composite number passes the Miller test in range For fewer than numbers false positive with probability:

Konstantin Busch - LSU62 If the primality test algorithm returns false then the number is not prime for sure If the algorithm returns true then the answer is correct (number is prime) with high probability: for