Sei sulla pagina 1di 34

Discrete Probability

Lecture 4
Discrete Probability
Definition of Probability

Probability Theory
CMSC 55 (Discrete Math Structures in Computer Science)
Conditional Probability

Independence

Bernoulli Trials and


Binomial Distribution

Richard Bryann Chua


University of the Philippines Manila
4.1
Discrete Probability
Agenda

1 Definition of Probability
Definition of Probability

Probability Theory

Conditional Probability
2 Probability Theory Independence

Bernoulli Trials and


Binomial Distribution

3 Conditional Probability

4 Independence

5 Bernoulli Trials and Binomial Distribution

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

sample space. Probability Theory

Conditional Probability

Independence

Bernoulli Trials and


Binomial Distribution

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

sample space. Probability Theory

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

sample space. Probability Theory

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|

Remark: The probability of an event is between 0 and 1,


inclusive. A probability of 0 means the event will never happen.
A probability of 1 means the event will surely happen.

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Pr[E 0 ] = 1 − Pr[E] Probability Theory

Conditional Probability

Independence

Bernoulli Trials and


Binomial Distribution

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

Pr[E 0 ] = 1 − Pr[E] Probability Theory

Conditional Probability

Proof: Recall that |E 0 | = |S| − |E|. Independence

Bernoulli Trials and


Binomial Distribution
0 |S| − |E|
Pr[E ] =
|S|
|E|
= 1−
|S|
= 1 − Pr[E]

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

Bernoulli Trials and


Binomial Distribution

4.8
Discrete Probability
Probability of Combination of Events

Theorem
Let E1 and E2 be events in the sample space S. Then

Pr[E1 ∪ E2 ] = Pr[E1 ] + Pr[E2 ] − Pr[E1 ∩ E2 ] Definition of Probability

Probability Theory

Conditional Probability

Independence

Bernoulli Trials and


Binomial Distribution

4.9
Discrete Probability
Probability of Combination of Events

Theorem
Let E1 and E2 be events in the sample space S. Then

Pr[E1 ∪ E2 ] = Pr[E1 ] + Pr[E2 ] − Pr[E1 ∩ E2 ] Definition of Probability

Probability Theory

Proof: Recall |E1 ∪ E2 | = |E1 | + |E2 | − |E1 ∩ E2 |. Conditional Probability

Independence

|E1 ∪ E2 | Bernoulli Trials and


Pr[E1 ∪ E2 ] = Binomial Distribution
|S|
|E1 | + |E2 | − |E1 ∩ E2 |
=
|S|
= Pr[E1 ] + Pr[E2 ] − Pr[E1 ∩ E2 ]

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


The function Pr from the set of all outcomes of the sample Binomial Distribution
space S is called a probability distribution.

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

The probability of an event E is the sum of the probabilities of Independence

the outcomes in E. That is, Bernoulli Trials and


Binomial Distribution
X
Pr[E] = Pr[s]
s∈E
P
(Note that when E is an infinite set, s∈E Pr[s] is a convergent
time series.)

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Pr[E ∩ F ] Probability Theory


Pr[E|F ] =
Pr[F ] Conditional Probability

Independence

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

events. Probability Theory

Conditional Probability

Independence

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

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

Pr[Ei1 ∩ Ei2 ∩ · · · ∩ Eim ] = Pr[Ei1 ] Pr[Ei2 ] · · · Pr[Eim ] whenever Probability Theory

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

probability of a success and q is a probability of failure, then Probability Theory

Conditional Probability
p + q = 1.
Independence

Bernoulli Trials and


Binomial Distribution

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

probability of a success and q is a probability of failure, then Probability Theory

Conditional Probability
p + q = 1.
Independence

Bernoulli Trials and


Binomial Distribution
Binomial Distribution
The probability of exactly k successes in n independent
Bernoulli trials, with probability of success p and probability of
failure q = 1 − p, is C(n, k )pk q n−k .

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

Bernoulli Trials and


Binomial Distribution

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

Bernoulli Trials and


Binomial Distribution

4.28

Potrebbero piacerti anche