Chapter 2 BFC34303 (New) PDF

You might also like

You are on page 1of 100

CIVIL ENGINEERING STATISTICS

BFC 34303
Chapter 2 :
PROBABILITY
The Definition of Basic Terms in
Probability

(i) A random experiment ~ a process


leading to at least two possible
outcomes with uncertainty as to
which they will occur.

(ii) Basic outcomes ~ the possible


outcomes of a random experiment

(iii) Sample Space ~ the set of all basic


outcomes ( denoted by S )
Example Random
Experiment
Tossing a fair coin
The result will be either a
“ head ” or a “ tail ”

Basic
Outcomes

Sample Space S = { H ,T }
H ~ head , T ~ tail
(iv) Event ~ is a subset of basic
outcomes from the sample space.
Example
Rolling a die
the basic outcomes are the
numbers 1, 2, 3, 4, 5 and 6. 2

Thus S = { 1, 2, 3, 4, 5 ,6 } 4 1 3
5
6
If A = { 1, 3, 5 }
Then A is an event of getting odd numbers
Example
List a sample space when two dice are
tossed or a die is tossed twice .

S = { (1,1) , (1,2) , (1,3) , (1,4) , (1,5) , (1,6)


(2,1) , (2,2) , (2,3) , (2,4) , (2,5) , (2,6)
(3,1) , (3,2) , (3,3) , (3,4) , (3,5) , (3,6)
(4,1) , (4,2) , (4,3) , (4,4) , (4,5) , (4,6)
(5,1) , (5,2) , (5,3) , (5,4) , (5,5) , (5,6)
(6,1) , (6,2) , (6,3) , (6,4) , (6,5) , (6,6) }
Thus n(S) = 36
Let A be an event of getting the sum
of two numbers is 6
Thus A = { (1,5) , ( 2,4) , (3,3) , (4,2) , (5,1) }

 n(A) = 5

Let B be an event of getting the sum


of two numbers is a multiple of 5
Thus B = { (1,4) , ( 4,1) , (2,3) , (3,2) ,
(5,5) , (4,6) , (6,4) }
 n(B) = 7
Mutually Exclusive Events

Two events A and B are called mutually


exclusive if there is no intersection between
the two events.
AB=

A B
Example

Rolling a die
Let A : getting even numbers
B : getting odd numbers
A B
A={2,4,6} 2 4 1 3
B={1,3,5} 6 5

Therefore, AB= 
Exhaustive Events

Two events A1, A2, A3,…., An are said to be


exhaustive events if

n( A1  A2  A3  ...  An )  n( S )

A1 A2 A3 A4
A5

A6 A7 A8
Example

Let S={1,2,3,4,5,6,7,8,9,10}.
If A={1,2,3,4,5,6} and
B ={5,6,7,8,9,10},
then n (A  B) =n (S).
Therefore,
A & B are exhaustive events.
Example

Let S={1,2,3,4,5,6}.
If A={2,4,6} and
B={1,3},
then n (A  B) ≠ n (S).
Therefore,
A and B are not exhaustive
events.
The Probability Of An Event

Definition
The probability of an event A occurring is
denoted by P(A) ,where

number of possibleoutcomes inA


P(A) =
number of all possible outcomes in S
= n(A)
n(S)
P(A) satisfies the following conditions

0 ≤ P(A) ≤ 1

If P(A) = 1 , => the event A is


a sure event

If P(A) = 0 , => the event A is


an impossible event
The complement of an event A is denoted
as A with

P(A)  1  P(A)

where P( A ) or P(A’) means the


probability that A doesn’t happen
Example
Two dice are tossed, find the probability
(a) the sum of the two numbers is 8
(b) the sum of the two numbers is a prime
number
Solution :
(a) Let A be the event the sum of the two
numbers is 8
A = { (2,6) , (6,2) , (3,5), (5,3) , (4,4) }
 n(A) = 5 , n(S) = 36
5
Thus P(A) =
36
(b) Let B be the event of getting the
sum of the two numbers is a prime
number.
B = { (1,1) , (1,2) , (1,4) , (1,6) , (2,1), (2,3) ,
(2,5) , (3,2) , (3,4) , (4,1) ,(4,3) , (5,2) ,
(5,6), (6,1) , (6,5) }
 n(B) = 15 , n(S) = 36
15 5
Thus P(B) = 
36 12
Example
Two fair coins are tossed simultaneously.
Find the probability of getting
(a) exactly two heads
(b) at least one head
Solution :

Start After 1st toss After 2nd toss


H
H
T

H
T
T
(a) S={HH,HT,TH,TT} n(S) = 4
Let A be the event of getting 2 heads
A = {HH}
1
Thus P(A) = 4

(b) Let B be the event of getting at


least one head
B = { HH,HT,TH}
Thus P(B) = 3
4
Venn Diagram

A Venn Diagram can also be used to solve probability problems

Example
TRY THIS
In a school of 320 students, 85 students are in the
band, 200 students are on sports teams, and 60
students participate in both activities. How many
students are involved in either band or sports?
DEFINITION
Probability of two events A or B occurring
can be calculated using additional probability
rules such as below,

P(A or B or both) = P(A) + P(B) – P(A and B) ,


can be denoted as P(A  B),

P(A  B) = P(A) + P(B) – P(A  B)


An integer is selected randomly from a set of
integers {1, 2,3, 4, 5, 6, 7, 8, 9, 10, 11,12 }. Find
the probability that the integer is
(a) an even number or is divisible by 3
(b) an even number and is not divisible by 3
(c) not an even number and is not divisible by 3.
An integer is selected randomly from a set of
integers {1, 2,3, 4, 5, 6, 7, 8, 9, 10, 11,12 }. Find
the probability that the integer is
(a) an even number or is divisible by 3.
(b) an even number and is not divisible by 3
(c) not an even number and is not divisible by 3
SOLUTION :
Let A = event that even number is chosen
  2 , 4 , 6 , 8 , 10 , 12
Let B = event that the chosen number is
divisible by 3
  3 , 6 , 9 ,12

a ) P ( A  B )  P ( A)  P ( B )  P ( A  B )
6 4 2 2
   
12 12 12 3
b) P ( A  B ')  P ( A)  P ( A  B )
6 2
 
12 12
1

3
c ) P ( A  B )'  1  P ( A  B )
2
 1
3
1

3
Example
Records showed that 80% of all drivers who are
summoned for various traffic offences are man
drivers. 17% are drivers below 30 years old, with
13% are man drivers who are below 30 years. If a
driver who is summoned is randomly selected, what
is the probability that the driver is a man or below 30
years old or both?

SOLUTION :
Let,
L = event to get a man driver
T = event to get a driver aged below 30 years
old
According to the information given,
P(L) = 0.80, P(T) = 0.17 and P(L  T) = 0.13
We want to find P(L  T).

Using the additional rule, we get

P(L  T) = P(L) + P(T) – P(L  T)


= 0.80 + 0.17 – 0.13
= 0.84

 probability that the driver is a man or


below 30 years old is 0.84
Sometimes information is also
NOTE given in table form. The value of
: probability is defined based on
that information.

A, B, C and D are four events that can be


written in the table below
C D

A P(A  C) P(A  D) P(A)


B P(B  C) P(B  D) P(B)
P(C) P(D)
Example

A survey is conducted on a group of workers


comprising of production operators,
administrative officers and security guards. The
survey is to determine the total working hours in
a week.

Production Administrative Security


operator officer guard
< 40 hrs 63 21 4 88
50 – 70 hrs 46 14 10 70
> 70 hrs 87 8 17 112
196 43 31
Production Administrative Security
operator officer guard
< 40 hrs 63 21 4 88
50 – 70 hrs 46 14 10 70
> 70 hrs 87 8 17 112
196 43 31
One of the workers in the survey is randomly
selected. Based on the information provided,
calculate the probability of
a) worker being a production operator.
b) worker who work between 50 – 70 hrs.
c) worker being an administrative officer and
working more than 70 hours.
d) worker being a security guard working
less than 40 hours.
SOLUTION :

Let
P = the worker is a production operator

A = the worker is an administrative officer

S = the worker is a security guard


196
a) P(P) 
196  43  31

196

270
98

135

b)P  working between 50  70hrs 


70

88  70  112
7

27
c) P(A  working more than70hrs)
8

270
4

135
d)P(S  working less than 40hrs)
4

270
2

135
MUTUALLY EXCLUSIVE EVENTS

• Two events A and B are called mutually


exclusive if they cannot occur at the
same time
• Neither event A nor event B can occur
simultaneously thus the probability of
A and B occuring at the same time is
zero.

P( A  B)  0
Definition 1
If A and B are mutually exclusive
events , then

P( A  B)  P( A)  P( B)
since P( A B ) = 0
On a Venn diagram
A B s
The concept of mutually exclusive
events can be extended to more than
two events.
Definition 2

If n events X1 , X 2 , X n are mutually


exclusive then,

P( X1  X 2 ....  X n )  P( X1 )  P( X 2 ).....  P( X n ).
Example
C and D are two events where P(C) = 0.1,
P(D)= 0.2 and P(C  D) = 0.3.
(a) Determine whether C and D are two
mutually exclusive events.
(b) Find P(C ) and P(C  D )
' ' '
Solution

(a) C and D are mutually exclusive events if


P(C  D) = P(C) + P(D)

Given P(C  D) = 0.3


P(C) + P(D) = 0.1 + 0.2 = 0.3
Thus C and D are mutually exclusive
events.

(b) P(C ' ) = 1 – P(C)


= 1 – 0.1
= 0.9
P(C  D ) can be determined by using the
' '

Venn diagram below

S
C D

P(C ' D ')  1  P(C  D)


= 1 - 0.3
= 0.7
Example
The events A, B , C and D are mutually
exclusive with P(A) = P(B) = 0.3 and
P(C) = P(D) = 0.1
If E and F are events defined by E = A  D
and F = B  C , find
a) P(E  F)
b) P( E  F)
Solution

a) P(E  F)  P( (A  D)  ( B  C))
 P(A)  P(B)  P(C)  P(D)
= 0.3 + 0.3 + 0.1 + 0.1
= 0.8

b) P( E  F)  P( (A  D)  ( B  C))
=0
since A, B, C and D are mutually
exclusive events
Example
A bag contains 4 red marbles, 2 white marbles
and 8 black marbles. What is the probability
that a marble picked from the bag at random
is either red or white ?
Solution :
Let R : event that red marble is picked
W :event that white marble is
picked
P( R U W ) = P(R) + P(W)
4 2
 
14 14
6

14
3

7
Example
The result of the final exam in a FKAAS are as
follows:
600 students passed the Hydraulic paper.
300 students passed the Geotechnical paper.
175 students passed both papers
50 students failed both papers.
From the information above, calculate :
(a) how many of the college students took the Geotechnical and
Hydraulic paper?

(b) the probability of students chosen who passed both papers.

(c) the probability of students chosen who did not pass in Geotechnical.
From the information above, calculate :

(a) how many of the college students


took the Geotechnical and Hydraulic
paper?

(b) the probability of students chosen


who passed both papers.

(c) the probability of students chosen


who did not pass in Geotechnical.
Solution
Let H : event that students passed Hydraulic
G : event that students passed Geotechnic
F : event that students failed both papers.

Therefore, n(H) = 600, n(G) = 300,


n(H  G) = 175 and n(F) = 50

(a)The total number of students who took


both papers, n(S) = n(F  (H  G))
Since the events of passed and failed
the courses are mutually exclusive,
n(S) = n(F) + n(H  G)

To find n(H  G),


n(H  G) = n(H) + n(G) – n(H  G)
= 600 + 300 – 175
= 725 students.

So, n(S) = n(F) + n(H G)


= 50 + 725
= 775 students.
(b) Probability of student who passed both
courses

n(A  M) 175
P(A  M)  
n(S) 775

7

31
(c) P( G’ ) = 1 - P(G)
300
1
775
475

775
19

31
Conditional Events

When an event occurs with the condition that


another event has occurred, then the event is
a conditional event.

Conditional Probability

- is the probability that an event will occur


given that another event has already occurred
52
Conditional Probability

For events A and B in a sample space S, the


conditional probability of A given B is
defined by

P( A  B )
P( A|B )  P(B)  0
P(B)

P (A|B) is read as“the probability of A givenB”


Example
A and B are two events such that
P(A) = 1/3, P(B) =1/4 and P(A U B) = 1/2 .
Find
a) P(A ∩ B) b) P(A|B)

c) P(B|A)
Solution:

a) P(A U B) = P(A) + P(B) - P(A ∩ B)


1 1 1
   P(A  B)
2 3 4
1 1 1
P(A ∩ B)   
3 4 2
1

12
P(A  B)
b) P( A | B) 
P(B)
1
 12
1
4
1

3
P(B  A)
c) P(B | A) 
P(A)
1
 12 1
1 
3
4
Example
30 professors out of 100 who are examined were
found to be overweight (W). 10 of them had high
blood pressure (H). Only 4 of the professors who
were not overweight had high blood pressure.
Find the probability that a professor
(a) is overweight if he had high blood pressure,
(b) will not have high blood pressure if he is
overweight.
Solution:

W W' Total

H 10 4 14

H' 20 66 86

Total 30 70 100
P(W Ç H)
(a) P(W | H) =
P(H)
10
2
= 100 =
14 7
100

P(H ' Ç W)
(b) P(H ' | W) =
P(W)
20
2
= 100 =
30 3
100
Example
Harry travels to work by either route A or route B.
The probability that he chooses route A is 1 .
4
The probability that he is late for work if he chooses
2
route A is and the probability that he is late for work
3
1
if he chooses route B is .
3
(a) What is the probability that he is late for work
on a particular day ?
(b) Given that he is not late for work, what is the
probability that he chooses route B ?
Solution:

2 L
3
1
4 A 1 L’
3 1
3 L
3 B
4 2
L’
3
62
1 2 3 1
(a) P(L)   
4 3 4 3
5

12
P(B  L')
(b) P( B|L' ) 
P(L')
3 2
x
 4 3 6
7 7
12
The probability rule for conditional events,

P( A  B)
P( A | B) 
P( B)
Then, we have

P ( A  B)  P ( B)  P ( A | B)

64
Definition
If A and B are independent events, it means
that the outcome of one event does not affect
the outcome of the other, then

P ( A | B )  P ( A) and P ( B | A)  P ( B )
Thus,
P ( A  B )  P ( A | B )  P ( B )  P ( A)  P ( B )

if A and B are two


independent events 65
Remark

If A and B are independent events, then


(A and B’), (A’ and B), and (A’ and B’) are
also independent events.

P ( A  B ')  P ( A)  P ( B ')
P ( A ' B )  P ( A ')  P ( B )
P ( A ' B ')  P ( A ')  P ( B ')
Example
Suppose two events A and B are independent.
Given P(A) = 0.4 and P(B) = 0.25.
Find

a ) P ( A  B) b) P ( A  B )

67
Solution: A and B are
independent
a ) P ( A  B)  P ( A)  P ( B )
 (0.4)(0.25)
 0.1 A and B are
independent
b) P ( A  B )  P ( A)  P ( B )  P ( A  B )
 P ( A)  P ( B )  P ( A)  P ( B )

 0.4  0.25  0.1


 0.55 68
Example
A, B and C are three events such that
A and B are independent, A and C are
mutually exclusive .
Given P(A) = 0.4 , P(B) = 0.2 , P(C) = 0.3
and P(B ∩ C ) = 0.1 .
Find
(a) P(A U B)
(b) P( C | B ) ( c) P( C | A’) 69
Solution: A and B are
independent
a) P(A U B) = P ( A)  P ( B )  P ( A  B )
 P ( A)  P ( B )  P ( A)  P ( B )
 0.4  0.2  (0.4)(0.2)
 0.52
b) P( C | B )  P (C  B )
P( B)
0.1
  0.5
0.2 70
c) P( C | A’)  P (C  A ')
P ( A ')
P (C )

1  P ( A)
A B C
0.3

1  0.4

 0.5
C  A'  C

71
Example
A mathematics puzzle is given to three
students Aziz, Bong and Samy. From the
past experience, known that the probabilities
Aziz, Bong and Samy will get the correct
solutions are 0.65, 0.6 and 0.55 respectively.
If three of them attempt to solve the puzzle
without consulting each other, find the
probability that:
a) the puzzle will be solved correctly by all of
them.
b) only one of them will get the correct 72
Solution:

Let A= the event that Aziz answers correctly


B= the event that Bong answers correctly
C= the event that Samy answers correctly

P(A) = 0.65, P(B) = 0.60 and P(C)=0.55

73
a)The event that the puzzle will be solved correctly
by all of them is the event A  B  C

P ( A  B  C )  P ( A)  P ( B )  P (C )

 (0.65)(0.60)(0.55)
 0.21

b) The events that only one of them will get the


correct solution will occur if one of the events
( A  B ' C ') , ( A ' B  C ') or P ( A ' B ' C )
occurs. 74
Thus,
P ( A  B ' C ')  P ( A ' B  C ')  P ( A ' B ' C )

 P  A   P  B '  P  C ' P  A '  P  B   P  C ' 

P  A '  P  B '  P  C 

 (0.65)(0.4)(0.45)  (0.35)(0.6)(0.45) 
(0.35)(0.40)(0.55)

 0.29
75
Example
The probability that Roy is late for college on any
day is 0.15 and is independent of whether he was
late on the previous day. Find the probability that
he

a) is late on Monday and Tuesday

b) arrives on time on one of these days

76
Solution:
0.15 LATE

0.15 LATE 0.85 ON TIME

0.15 LATE
0.85 ON TIME
0.85 ON TIME

Monday Tuesday 77
a) P( late on Monday and Tuesday )
= (0.15)(0.15)
= 0.0225

b) P( arrives on time on one of these days )


= (0.15) (0.85) + (0.15)(0.85)
= 0.1275 + 0.1275
= 0.2550

78
RECALL

the conditional probability of A given B is


written as
P(AB)
P(A | B) 
P(B)
The event that has
The event whose already occurred
probability is to be
determined 84
If you are given

How do you find ?


P(B | A) = 0.2
P(A | B) = ?
When the condition is reversed ,
Bayes’ Theorem is used to solve
such problems.

85
TOTAL PROBABILITY OF EVENT B = P(B)

P( B | A ) B

A B’
P( A)

P( B | A’ )
B
P( A’) A’
B’

P( B ) = P(A) x P( B | A ) + P(A’) x P( B | A’ ) 86
THE TOTAL PROBABILITY THEOREM

TOTAL PROBABILITY OF EVENT B = P(B)

In general, if events A1 ,A2, .……., An are


mutually exclusive and exhaustive events,
then the probability of event B is given by :

P( B ) = P(A1) x P( B | A1 ) + P(A2) x P( B | A2 )
+ P(A3) x P( B | A3 ) +…..+ P(An) x P( B | An )
87
P (A|B) : “the probability of A given B”
P
(AB
)
P
(A|B
)
P(B
)
P
(
A
|B 
)
P(
B
)P(
AB)

P (B|A) : “the probability of B given A”


P
(BA)
P
(B|A
)
P(A)
P
(
B
|
A )
P(
A
)P(
B A) 88
P
(AB
)
P
(A|B
) (1)
P(B
)
P
(
B
|
A
)
P
(
A
)P
(
B
A
)(2)

S
i
n
c
eP

A
B
P
(
BA
)
Substitute (2) into (1) , we get :
BAYES’
THEOREM
P(
B|
A 
)P(
A)
P
(
A|B
)
P(B) 89
BAYES’ THEOREM

P(
B|
A ) 
P(
A)
P
(
A|
i
B
) i i

P(B)
where A1 , A2 , ….. , An are n mutually
exclusive and exhaustive events so that
A1 A2  …….  An = S ,
the possibility space, and B is an arbitrary
event of S ( i = 1,2,3,…..,n ) .
P(B) is the total probability of event B.
Bayes’ Theorem is useful when we have
90
to ‘ reverse the conditions ’ in a problem.
Example
There are 12 red balls and 8 green balls in a
bucket. Two balls are taken out in sequence
without replacement. By using a tree
diagram , find the probability that
(a) the first ball is red
(b) the second one is red if the first is red
(c) the second one is red if the first is green
(d) the second one is red
(e) the first one is red if the second is red
91
Solution: R ~ red ball
11 R2 G ~ green ball
19
12 R1
8 G2
20
19 12
19 R2
8 G1
20 7
G2
19

1st draw 2nd draw 92


12 3
(a) P( first ball is red) = P(R1) 
20 5

11
(b) P( R2 | R1 ) 
19
Or using the formula of
conditional probability
 12  11 
P
(R  R )  20  19 
P( R2 | R1 )  1 2
   
P(R1) 12
11 20
 93
19
(c) P( R2 | G1 ) Direct from the
tree diagram

(d) P( R2) = P( R2 | R1) X P(R1) + P(R2 | G1) X P(G1)


= P( R1 ∩ R2) + P(G1 ∩ R2)

94
P
(R| R
2 1)P
(R1)
(e) P(R1 | R2 ) =
P
(R2)
 11  12 
 19  20 
‘Reverse    
condition’ 3
use Bayes’ 5
Theorem
11

19
95
Example
Harry travels to work by route A or route B.
1
The probability that he chooses route A is .
4
The probability that he is late for work if he goes to
2
work by route A is and the corresponding
3
1
probability if he goes to work by route B is .
3
(a) What is the probability that he is late for work
on Monday ?
(b) Given that he is late for work, what is the
probability that he went to work by route B ?
96
Solution:

2 L (late) P(A) x P(L|A)


3
1
4 A 1 L’ (not late)
3 1
3 L (late) P(B) x P(L|B)
3 B
4 2
L’ (not late)
3
ROUTE ARRIVE AT WORK
97
(a) P ( L ) = P(A) x P( L | A ) + P(B) x P( L | B)
1231 5
    
   1 2
4343
BAYES’
P(
L|
B 
)P(
B)

THEOREM
(b) P
(
B|L)
P(L)
 1 3
 3 4 3
    
5 5
98
12
Example
Aishah, Siti and Muna pack biscuits in a
factory. Aishah packs 55%, Siti 30% and
Muna 15% from the batch allotted to them.

The probability that Aishah breaks some


biscuits in a packet is 0.7, and the
respective probabilities for Siti and Muna
are 0.2 and 0.1.

What is the probability that a packet with


broken biscuits found by the checker was
packed by Aishah ? 99
Solution: A – Aishah, S – Siti , M - Muna
B – Broken Biscuits
0.7 B

B’
P(A|B)
0.55 A 0.3
P(B|A)P(A)
0.2 B 
0.3 S P(B)
0.8 B’
0.15 M 0.1
B

0.9 B’ 100
BAYES’
THEOREM
P(
B|
A 
)P(
A)
P
(
A|B
)
P(B)

0
.
70.
5
5

(
0
.5
5
0
.
7
)(
0.
3
0.
2
)(
0.
1
50
.
1
)

0.
7 0.
55
 
0.
837
0.
46 101
Example
According to a firm’s internal survey, of those
employees living more than 2 miles from work , 90%
travel to work by car. Of the remaining employees,
only 50% travel to work by car. It is known that 75%
of employees live more than 2 miles from work.
Find
(i) the overall proportion of employees who travel to work by
car.

Find
(ii) the probability of an employee lives more than 2 miles from
work who travels to work by car.

102
Solution:
Define the events C , B1 , B2 as follows :
C : Travels to work by car
B1 : Lives more than 2 miles from work
B2 : Lives not more than 2 miles from work

The events B1 and B2 are mutually exclusive


and exhaustive.
P(B1) = 0.75 , P(B2) = 0.25
P( C | B1 ) = 0.9 and P( C | B2 ) = 0.5
103
103
Solution:
C (i) P(C) =
0.9
B1 P(B1) x P( C | B1 )
0.75 0.1 C’
+ P(B2) x P( C | B2 )

0.5 = ( 0.75 x 0.9 ) +


C
0.25 B2 ( 0.25 x 0.5 )
0.5 C’ = 0.8

P( C | B1 ) = 0.9 P( C | B2 ) = 0.5 80% of employees


travel to work
P(B1)
104= 0.75,P(B2) = 0.25
104
by car.
BAYES’
(ii) THEOREM
P(
C|
B 
)P(
B)
P
(
B|
1
C
) 1 1

P (
C)

0.90 .7
5

0.8


0.
843
75
105

You might also like