Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Unit 8 Events and Probability
Unit 8 Events and
Probability
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
1
Unit 8 Events and Probability
Events and Probability
What is the probability that a person will
win a lottery where 6 numbers are chosen
from the first 46 positive integers?
The theory of probability arises in the
study of gambling games.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
2
Unit 8 Events and Probability
8.1 Finite Probability
An experiment is a procedure that yields
one set of possible outcomes.
The sample space is the set of possible
outcomes.
An event is a subset of the sample space.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
3
Unit 8 Events and Probability
Each possible outcome is called a sample
point and the set of all possible outcomes
is the possibility space S.
If the possibility space is finite, then the
number of sample points in S is denoted
by n(S).
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
4
Unit 8 Events and Probability
Also n(E) denote the number of sample
points in an event E.
Clearly n(E) n(S).
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
5
Unit 8 Events and Probability
Consider an example for one throw of a
fair die the possibility space
S ={1, 2, 3, 4, 5, 6} and n(S) =6.
Let E1 be the event that the number is even,
then
E1 ={2, 4, 6} and n(E1) =3.
Let E2 be the event that the number is
greater than 2, then
E2 ={3, 4, 5, 6} and n(E2) =4.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
6
Unit 8 Events and Probability
Laplace’s definition of
probability:
If the possibility space S consists of a
finite number of equally likely outcomes,
then the probability of an event E, written
P(E) is defined as
n E
PE
n S
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
7
Unit 8 Events and Probability
Refer to the previous example,
nE1 3 1
PE1
n S 6 2
and
n E2 4 2
P E2
n S 6 3
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
8
Unit 8 Events and Probability
8.2 Certain Events and
Impossible Events
Suppose there are
n sample points in the possibility space
and
r sample points in an event E,
so that
n(S) = n and n(E) = r.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
9
Unit 8 Events and Probability
The probability of the event E occurs is
n E r
PE
n S n
Since
0 r n,
then
r
0
1,
n
hence
0 P(E) 1.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
10
Unit 8 Events and Probability
That is the probability of an event E is
between 0 and 1 inclusive.
If P(E) = 0 then the event cannot happen,
i.e. impossible event.
If P(E) =1 then the event is certain to
happen, i.e. certain event.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
11
Unit 8 Events and Probability
For example,
if a coin with both heads is tossed,
the following probabilities will be
obtained.
P(a tail is obtained) = 0
P(a head is obtained) = 1
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
12
Unit 8 Events and Probability
8.3 Complementary Events
Let E be an event in a sample space S.
The probability of the event ,E
the complementary event E, is given by
PE 1 PE
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
13
Unit 8 Events and Probability
Example 8.3-1
A sequence of 8 bits is randomly generated.
What is the probability that at least one of
these bits is 1?
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
14
Unit 8 Events and Probability
Solution 8.3-1
The possibility space S is the set of all bit
strings of length 8,
so that n( S ) = 28.
Let E be the event that at least one of the 8
bits is 1,
then E is the event that all the bits are 0s
and n( E ) = 1.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
15
Unit 8 Events and Probability
It follows that
nE
1
1
255
PE 1 PE 1
1 8 1
n S
2
256 256
Hence, the probability that the bit string will
contain at least one 1 bit is
255
256
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
16
Unit 8 Events and Probability
8.4 The Probability of
Union
Let E1 and E2 be the events in the sample
space S
such that P(E1) 0 and P(E2) 0.
Then
P( E1 or E2 )
=P( E1 ) + P( E2 ) - P( E1 and E2 ).
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
17
Unit 8 Events and Probability
Notethat‘E1 or E2’means
E1 occurs,
or E2 occurs,
or both E1 and E2 occur.
In set notation
P( E1 E2 ) =P( E1 ) + P( E2 ) - P( E1E2 ).
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
18
Unit 8 Events and Probability
Example 8.4-1
In a class of 40 students,
6 out of 15 boys and
13 out of 25 girls wear glasses.
What is the probability that a student
chosen at random from the class is
a boy or
someone who wears glasses?
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
19
Unit 8 Events and Probability
Solution 8.4-1
Let B be the event that the student chosen
is a boy and
let W be the event that the student chosen
wears glasses.
Since
P( B W ) = P( B ) + P(W) - P( B W )
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
20
Unit 8 Events and Probability
15 19 6
Then P( B W )
40 40 40
28
40
7
10
Therefore, the probability that a student
chosen at random from the class is a boy or
someone who wears glasses is 0.7.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
21
Unit 8 Events and Probability
8.5 Mutually Exclusive
Events
Let E1 and E2 be the events in the sample
space S such that
E1 can occur
or E2 can occur
but not both E1 and E2 can occur,
then the two events E1 and E2 are said to
be mutually exclusive.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
22
Unit 8 Events and Probability
In this case
n( E1 E2 ) =0 and E1 E2 = .
In set notation, when E1 and E2 are
mutually exclusive events
P( E1 E2 ) = P( E1 ) + P( E2 ) and
P( E1 E2 ) = 0
This is known as the addition law for
mutually exclusive events.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
23
Unit 8 Events and Probability
Example 8.5-1
Suppose that there are eight runners in a
race including John, David and Albert.
The probability that
1
John wins the race is
2
1
David wins the race is
4
1
and Albert wins the race is
8
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
24
Unit 8 Events and Probability
Assume there are no dead heats, find the
probability that
(a) John or David or Albert wins,
(b) neither John nor David wins.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
25
Unit 8 Events and Probability
Solution 8.5-1
Since we assume that only one runner can
win, the events above are mutually
exclusive.
Let J be the event that John wins the race,
D be the event that David wins the race
and
A be the event that Albert wins the race.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
26
Unit 8 Events and Probability
(a) Probability that John or David or
Albert wins the race is
P( J or D or A )
= P( J ) + P( D ) + P( A )
1 1 1
2 4 8
7
8
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
27
Unit 8 Events and Probability
(b) Probability that neither John nor
David wins the race is
1 - P( J or D )
= 1 - [ P( J ) + P( D ) ]
1 1
1
2 4
1
4
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
28
Unit 8 Events and Probability
8.6 Exhaustive Events
Let E1 and E2 be the events in the sample
space S
such that E1 E2 =S
then P( E1 E2 ) =1.
The events E1 and E2 are said to be
exhaustive.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
29
Unit 8 Events and Probability
Example 8.6-1
Two fair coins are tossed.
A is the event that at least one tail is
obtained.
(a) Describe an event B such that
A and B are exhaustive events
only.
(b) Describe an event C such that
A and C are both mutually
exclusive and exhaustive.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
30
Unit 8 Events and Probability
Solution 8.6-1
(a) The possibility space
S = {HH, HT, TH, TT}
and the event A = {HT, TH, TT}.
Let B be the event that at least
one head is obtained, then
B = {HH, HT, TH}.
Since AB={HH, HT, TH, TT}=S,
A and B are exhaustive events.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
31
Unit 8 Events and Probability
(b) Let C be the event that no tail is
obtained, then C = {HH}.
Since A C={HH, HT, TH, TT} =S
and A C = ,
A and C are both mutually
exclusive and exhaustive.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
32
Unit 8 Events and Probability
Example 8.6-2
In a class of 40 students all study at least
one of the subjects computer science and
discrete mathematics.
27 attend the computer science class and
32 attend the discrete mathematics class.
Find the probability that a student chosen
at random studies both computer science
and discrete mathematics.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
33
Unit 8 Events and Probability
Solution 8.6-2
Let C be the event that the student chosen
is study computer science and
let M be the event that the student chosen
is study discrete mathematics.
Since all students study at least one of the
subjects computer science and discrete
mathematics, C and M are exhaustive
events.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
34
Unit 8 Events and Probability
Then
n( C M ) = n( C ) +n( M ) - n( C M )
40 = 27 +32 - n( C M )
n( C M ) = 19
Therefore the probability that a student
chosen at random studies both computer
science and discrete mathematics is
19
P( C M ) =
40
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
35