Professional Documents
Culture Documents
Counting
Summation Principle
Multiplication Principle
Permutation
Combination
Pigeon Hole Principle
Probability
Example:
Example:
Random Test: Flip a coin twice and record
head-tail sequence.
Sample space: S = { HH, HT, TH, TT }
Event A and C = { }
Event A or C = { }
Using set operation:
A or C = A C = { HH,HT,TH,TT }
A and C =AC ={ }
Union: XY X or Y
Intersection: XY X and Y
Complement: X not X
Event that did not intersect is known as mutually exclusive :
XY=
Note:
Probability event
Event
A = { y1, y2, y3, ym }
p(A) = mi=1 pi
where yi has probability
pi to happen
Example:
Toss a dice once and observe the result
Example 1:
An urn contains four blue balls and five red
balls. What is the probability that a ball
chosen from the urn is blue?
Solution:
1. There are nine possible outcomes, and
2. The event blue ball is chosen comprises four of these
outcomes.
3. Therefore, the probability of this event is 4/9 or
approximately 44.44%.
Note: S = { b1, b2, b3, b4, r1, r2, r3, r4, r5 }
Note: E = { b1, b2, b3, b4 }
Therefore p(E) = 4/9
CPT112 March 8, 2015
Discrete Probability
20/40
Example 2:
What is the probability of winning the lottery that
is, you have to pick the correct set of six numbers
out of 49 numbers?
Solution:
1. There are C(49, 6) possible outcomes.
2. Only one of these outcomes will actually make you
win the lottery.
Example 1:
A sequence of 10 bits is randomly generated.
What is the probability that at least one of
these bits is zero?
Solution:
1. There are 210 = 1024 possible outcomes of
generating such a sequence.
2. The event E, none of the bits is zero, includes
only one of these outcomes, namely the sequence
1111111111.
|S|=1024, |E |=1
Therefore, p(E) = (1/1024).
Now p(E) can easily be computed as
p(E) = 1 p(E) = 1 (1/1024) = 1023/1024.
CPT112 March 8, 2015
Discrete Probability
25/40
Example:
Solution:
1. E2: integer is divisible by 2
2. E5: integer is divisible by 5
E2 = {2, 4, 6, , 100}
|E2| = 50, |S|=100
p(E2) = 0.5
CPT112 March 8, 2015
Discrete Probability
28/40
Meaning,
each probability must be a value between 0 and 1,
and
the probabilities must add up to 1, because one of
the outcomes is guaranteed to occur.
p(E) = sE p(s)
Example 1:
Solution:
Example 2:
Solution:
Eodd = {s1, s3, s5}
Example:
Solution:
1. E: bit string contains at least two consecutive 0s
2. F: first bit of the string is a 0
3. We know the formula p(E | F) = p(E F)/p(F).
E F = {0000, 0001, 0010, 0011, 0100}
p(E F) = 5/16
p(F) = 8/16 =
p(E | F) = (5/16)/(1/2)
= 10/16
= 0.625
CPT112 March 8, 2015