Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Lecture 4
Discrete Probability
Definition of Probability
Probability Theory
CMSC 55 (Discrete Math Structures in Computer Science)
Conditional Probability
Independence
1 Definition of Probability
Definition of Probability
Probability Theory
Conditional Probability
2 Probability Theory Independence
3 Conditional Probability
4 Independence
4.2
Discrete Probability
Definition of Probability
Definition
An experiment is a procedure that yields one of a given set of
possible outcomes. The sample space of the experiment is
the set of possible outcomes. An event is a subset of the Definition of Probability
Conditional Probability
Independence
4.3
Discrete Probability
Definition of Probability
Definition
An experiment is a procedure that yields one of a given set of
possible outcomes. The sample space of the experiment is
the set of possible outcomes. An event is a subset of the Definition of Probability
Conditional Probability
Independence
Laplace’s Definition of Probability Bernoulli Trials and
Binomial Distribution
If S is a finite space of equally likely outcomes, and E is an
event, that is, a subset of S, then the probability of E is
|E|
Pr(E) =
|S|
4.3
Discrete Probability
Definition of Probability
Definition
An experiment is a procedure that yields one of a given set of
possible outcomes. The sample space of the experiment is
the set of possible outcomes. An event is a subset of the Definition of Probability
Conditional Probability
Independence
Laplace’s Definition of Probability Bernoulli Trials and
Binomial Distribution
If S is a finite space of equally likely outcomes, and E is an
event, that is, a subset of S, then the probability of E is
|E|
Pr(E) =
|S|
4.3
Discrete Probability
Example
An urn contains four blue balls and five red balls. What is the
probability that a ball chosen from the urn is blue?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.4
Discrete Probability
Example
What is the probability that when two dice are rolled, the sum
of the number on the two dice is 7?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.5
Discrete Probability
Example
What is the probability that a poker hand contains a full house?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.6
Discrete Probability
Probability of Combination of Events
Theorem
Let E be an event in a sample space S. The probability of the
event E 0 , the complementary event of E, is given by
Definition of Probability
Conditional Probability
Independence
4.7
Discrete Probability
Probability of Combination of Events
Theorem
Let E be an event in a sample space S. The probability of the
event E 0 , the complementary event of E, is given by
Definition of Probability
Conditional Probability
4.7
Discrete Probability
Example
A sequence of ten bits is randomly generated. What is the
probability that at least one of these bits is 0?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.8
Discrete Probability
Probability of Combination of Events
Theorem
Let E1 and E2 be events in the sample space S. Then
Probability Theory
Conditional Probability
Independence
4.9
Discrete Probability
Probability of Combination of Events
Theorem
Let E1 and E2 be events in the sample space S. Then
Probability Theory
Independence
4.9
Discrete Probability
Example
What is the probability that a positive integer selected at
random from the set of positive integer not exceeding 100 is
divisible by either 2 or 5?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.10
Discrete Probability
Assigning Probabilities
Definition
Let S be the sample space of an experiment with a finite or
countable number of outcomes. We assign a probability Pr[s]
to each outcome s meeting the following conditions: Definition of Probability
Probability Theory
1 0 ≤ Pr[s] ≤ 1 ∀s ∈ S Conditional Probability
P
s∈S Pr[s] = 1
2
Independence
4.11
Discrete Probability
Example
What probabilities should we assign to the outcomes H
(heads) and T (tails) when a fair coin is flipped? What
probabilities should be assigned to these outcomes when the
coin is biased so that heads come up twice as often as tails? Definition of Probability
Probability Theory
Conditional Probability
Independence
4.12
Discrete Probability
Assigning Probabilities
Definition
Suppose that S is a set with n elements. The uniform
distribution assigns the probability 1/n to each element of S.
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.13
Discrete Probability
Assigning Probabilities
Definition
Suppose that S is a set with n elements. The uniform
distribution assigns the probability 1/n to each element of S.
Definition of Probability
Probability Theory
Definition Conditional Probability
4.13
Discrete Probability
Example
Suppose that a die is biased (or loaded) so that 3 appears
twice as often as each other number but that the other five
outcomes are equally likely. What is the probability that an odd
number appears when we roll the die? Definition of Probability
Probability Theory
Conditional Probability
Independence
4.14
Discrete Probability
Probability of Combination of Events
Theorem
If E1 , E2 , . . . is a sequence of pairwise disjoint events in a
sample space S, then
Definition of Probability
" #
[ X Probability Theory
Pr Et = Pr [Et ] Conditional Probability
t t Independence
4.15
Discrete Probability
Conditional Probability
Definition
Let E and F be events with Pr[F ] > 0. The conditional
probability of E given F , denoted by Pr[E|F ], is defined as
Definition of Probability
Independence
4.16
Discrete Probability
Example
An urn contains 1 black and 2 red balls. Two balls are drawn
one after the other. What is the probability that the second ball
drawn is red given that the first ball is black?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.17
Discrete Probability
Example
In the previous example, find the probability that the first ball is
black and the second ball is red.
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.18
Discrete Probability
Example
Two cards are drawn in succession from a standard deck.
What is the probability that both cards are red?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.19
Discrete Probability
Example
Suppose that in the first example (1 black and 2 red balls), the
balls are drawn with replacement. What would the resulting
probability be?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.20
Discrete Probability
Example
A bit string of length four is generated at random so that each
of 16 bit strings of length four is equally likely. What is the
probability that it contains at least two consecutive 0s given
that its first bit is a 0? Definition of Probability
Probability Theory
Conditional Probability
Independence
4.21
Discrete Probability
Independence
Definition
The event E and F are independent iff. Pr[E ∩ F ] = Pr[E] Pr[F ].
Remark: Events that are not independent are called dependent Definition of Probability
Conditional Probability
Independence
4.22
Discrete Probability
Example
In a freshmen class, exam results showed that 15% of the
students failed Physics, 16% failed English and 2% failed both
Physics and English. Are the two events, failing Physics and
failing English, independent? Definition of Probability
Probability Theory
Conditional Probability
Independence
4.23
Discrete Probability
Example
Are the events E, that a family with three children has children
of both sexes and F , that a family with three children has at
most one boy, independent. Assume that the eight ways a
family can have three children are equally likely. Definition of Probability
Probability Theory
Conditional Probability
Independence
4.24
Discrete Probability
Pairwise and Mutual Independence
Definition
The events E1 , E2 , . . . , En are pairwise independent iff.
Pr[Ei ∩ Ej ] = Pr[E1 ] Pr[E2 ] for all pairs of integers i and j with
1 ≤ i < j ≤ n. These events are mutually independent if Definition of Probability
Conditional Probability
ij , j = 1, 2, . . . , m, are integers with 1 ≤ i1 < i2 < . . . < im ≤ n
Independence
and m ≥ 2.
Bernoulli Trials and
Binomial Distribution
4.25
Discrete Probability
Bernoulli Trial and Binomial Distribution
Bernoulli Trial
Each performance of an experiment with two possible
outcomes is called a Bernoulli trial. A possible outcome of a
Bernoulli trial is called a success or failure. If p is the Definition of Probability
Conditional Probability
p + q = 1.
Independence
4.26
Discrete Probability
Bernoulli Trial and Binomial Distribution
Bernoulli Trial
Each performance of an experiment with two possible
outcomes is called a Bernoulli trial. A possible outcome of a
Bernoulli trial is called a success or failure. If p is the Definition of Probability
Conditional Probability
p + q = 1.
Independence
4.26
Discrete Probability
Example
A coin is biased so that the probability of heads is 2/3. What is
the probability that exactly four heads come up when the coin is
flipped seven times, assuming that the flips are independent?
Definition of Probability
Probability Theory
Conditional Probability
Independence
4.27
Discrete Probability
Example
Suppose that the probability that a 0 bit is generated is 0.9, that
the probability that a 1 bit is generated is 0.1, and that bits are
generated independently. What is the probability that exactly
eight 0 bits are generated when 10 bits are generated? Definition of Probability
Probability Theory
Conditional Probability
Independence
4.28