0% found this document useful (0 votes)
8 views22 pages

Lecture 2 - CSE38900 - Rev1

Uploaded by

xogix28490
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views22 pages

Lecture 2 - CSE38900 - Rev1

Uploaded by

xogix28490
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

CSE38900 Quantitative Methods for Engineers

Lecture 2

Ir CL KWAN
Department of Civil and Environmental Engineering
The Hong Kong Polytechnic University
Probability
Definition
Random experiment: An experiment is a process that results
in an outcome that cannot be predicted
in advance with certainty
Experiment: Flip a coin
Outcomes: Heads or tails

Experiment: Roll a dice


Outcomes: 1, 2, 3, 4, 5, or 6

Experiment: Ask a stranger how tall he is


Outcomes: Some number between 0 to 250 cm

Outcomes are mutually exclusive

Sample space or Outcome space S : list of ALL possible outcomes


of the experiment

Roll a dice: S = {1, 2, 3, 4, 5, 6}


3
Event
Event: A collection or set of one or more individual outcome
in a sample space
: A subset of a sample space

Event: Get a 3 on a dice


Event: Get a number that is >2 on a dice

Event: Get a total of 12 on two dices

Event: Get a score of 67 on an exam

Event: Get a passing score on an exam

4
Combining Events

The union of two events A and B, denoted A ∪ B, is


the set of outcomes that belong either to A, to B, or to
both.

The intersection of two events A and B, denoted by


A ∩ B, is the set of outcomes that belong both to A
and to B.

Sample space S S

5
The complement of an event A, denoted Ac or A’, is the
set of outcomes that do not belong to A.

The events A and B are said to be mutually exclusive if they


have no outcomes in common. More generally, a collection
of events A1 , A2 ,..., An is said to be mutually exclusive if no
two of them have any outcomes in common. Sometimes
mutually exclusive events are referred to as disjoint events.

A AC A B

S S
6
Probabilities

Definition:
Each event in the sample space has a probability
of occurring. Intuitively, the probability is a
quantitative measure of how likely the event is to
occur.

Given any experiment and any event A:


 The expression P(A) denotes the probability that
the event A occurs.
 P(A) is the proportion of times that the event A
would occur in the long run, if the experiment
were to be repeated over and over again.

7
Axioms of Probability

1. Let S be a sample space. Then P(S) = 1.

2. For any event A, 0 ≤ P ( A) ≤ 1 .

3. If A and B are mutually exclusive events, then


P( A ∪ B)= P( A) + P( B) . More generally, if
A1 , A2 , are mutually exclusive events, then
P(A1∪A2∪…)=P(A1)+P(A2)+...

8
Mutually exclusive events
Events A and B are mutually exclusive if it is impossible for both
of them to occur.

P( A ∪ B)= P( A) + P( B)
A B P( A and B ) = 0

9
A Few Useful Things
 For any event A,
P(AC) = 1 – P(A).
 Let φ denote the empty set. Then
P(φ ) = 0.
 If A is an event containing outcomes O1,…,On ,
that is, if A={O1,…,On} , then
P(A)=P(O1)+…+P(On)

 Addition Rule (for when A and B are not


mutually exclusive):
P ( A ∪ B )= P ( A) + P( B) − P( A ∩ B)
10
Addition Rule

A B

S A + B -

P ( A ∪ B )= P ( A) + P( B) − P( A ∩ B)

11
Example 1
In a process that manufactures aluminum cans, the
probability that a can has a flaw on its side is 0.02,
the probability that a can has a flaw on the top is
0.03, and the probability that a can has a flaw on both
the side and the top is 0.01.

1. What is the probability that a randomly chosen can


has a flaw?

2. What is the probability that it has no flaw?

3. What is the probability that it has a flaw on the top


but not on the side? 12
Suggested Solution

P ( A ∪ B )= P ( A) + P( B) − P( A ∩ B)
A B

1. A = An event that a can has a flaw on the top;


B = An event that a can has a flaw on side;
∴ A∩B= the event that flaw on side and flaw on top.
Given that P(A)=0.03;P(B)=0.02;P(A∩B)=0.01
∴P(flaw)=P(A∪B)=0.03+0.02-0.01=0.04
2. P(no flaw)=1-P(flaw)=1-P(A∪B)=1-0.04=0.96
3. P=0.02 (Please work out the solution) 13
Conditional Probability

Definition: The conditional probability of an event A,


given that event B has occurred, is defined by
P( A ∩ B)
P( A | B) =
P( B)
provided that P(B) > 0.

P( A and B )
P(A B ) = B
P (B )
A B

14
Example 1 (cont.)
In a process that manufactures aluminum cans, the
probability that a can has a flaw on its side is 0.02,
the probability that a can has a flaw on the top is
0.03, and the probability that a can has a flaw on both
the side and the top is 0.01.

4. What is the probability that a can will have a flaw


on the top, given that it has a flaw on the side?
P( A and B ) 0.01
P( flaw on top flaw on side) = P( A B ) = = = 0.5
P (B ) 0.02
5. What is the probability that a can will have a flaw
on the side, given that it has a flaw on the top?
P=0.33 (Please work out the solution) 15
Independent events
Two events A and B are independent if given the occurrence of
one event, the probability of occurrence of the other event is not
changed:

P ( A B ) = P ( A) or P (B A) = P (B )

Rolling 1 dice the first time:


P(2) = 1/6
P(3) = 1/6
A B
If you get a 2 in the first roll, the
chance of getting a 3 in the second
roll:
P(3|2) = 1/6
= P(3)

The two events are independent


16
The Multiplication Rule
 If A and B are two events and P(B) ≠ 0, then
P(A ∩ B) = P(B)P(A|B).

 If A and B are two events and P(A) ≠ 0, then


P(A ∩ B) = P(A)P(B|A).

 If P(A) ≠ 0, and P(B) ≠ 0, then both of the above


hold.

 If A and B are two independent events, then


P(A ∩ B) = P(A)P(B). The result can be extended
to any number of independent events
P(A1 ∩ A2 ∩… ∩ An ) = P(A1)P(A2)…P(An)
17
Example 2
Of the microprocessors manufactured by a certain
process, 20% are defective. Five microprocessors are
chosen at random. Assume they function independently.
What is the probability that they all work?

Let Ai be the event that ith microprocessor works.


Then,
P(all 5 work)= P(A1 ∩ A2 ∩… ∩ A5 )
= P(A1)P(A2)…P(A5)
=(1-0.2)5=0.328
What is the probability that at least one of the microprocessor
works? P=0.9997 (Please work out the solution)
18
Example 3 – multiplication rule
A class has 7 male students and 3 female students. The professors wants
to select 2 students at random to work on a project. What is the probability
that the 2 students chosen are female?

Event A: the first student is female P ( A) = 3 10

Event B: the second student is female

P (B A) = 2 9
But if A already happened, the
probability of B happening given A is:

The probability of both event happening:

P ( A and B ) = P (B A)⋅ P ( A) = (2 9 )(3 10 ) = 0.067


19
Probability tree
A class has 7 male students and 3 female students. The professors wants
to select 2 students at random to work on a project.

First selection Second selection


P(F and F) = (3/10)(2/9) = 0.067

P(F and M) = (3/10)(7/9) = 0.233

P(M and F) = (7/10)(3/9) = 0.233

P(M and M) = (7/10)(6/9) = 0.467

20
Summary
Complement rule

( )
P AC = 1 − P ( A )
A AC

Addition rule

P( A or B ) = P( A) + P(B ) − P( A and B ) A B

Multiplication rule

P ( A and B ) A B
P (A B ) =
P (B )
21
The End
of the Session
22

You might also like