0% found this document useful (0 votes)
60 views

Prob Zoompdf

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Prob Zoompdf

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

Probability and

HCMC University of Technology


Dung Nguyen Statistics

Probability
Outline I
1 Probability

2 Conditional Probability

3 The total probability formula

4 Bayes’s Formula
Dung Nguyen Probability and Statistics 2/77
Probability

Experiments
An experiment is a procedure that is
carried out under controlled conditions, and
executed to discover an unknown result.
A trial is a single performance of an
experiment.
An outcome is the result of a trial.
Random experiment: different outcomes
even when repeated in the same manner
every time.
Flip a coin, Roll a die, Roll two dice
Measure current
Dung Nguyen Probability and Statistics 3/77
Probability

Sample space
The sample space Ω of an experiment is
the set of all possible outcomes
Ω = {H, T}
Ω = {1, 2, 3, 4, 5, 6}
Ω = {(i, j), i, j = 1, 2, ..., 6}
Ω is discrete if it consists of a
finite or countable infinite set of
outcomes.
Ω is continuous if it contains an
interval of real numbers.
All subsets of Ω are called events.
Dung Nguyen Probability and Statistics 4/77
Probability

Example 1 - Recycle time


Randomly select a camera and record the
recycle time of a flash.
Ω = R+ = {x|x > 0}.
Ω = {x|1.5 < x < 5}
It is known that the recycle time has
only three values(low, medium or high).
Then Ω = {low, medium, high}.

Dung Nguyen Probability and Statistics 5/77


Probability

Events
An event A is a subset of the sample space
of a random experiment. (= statement,
sentence, clause)
Example
Recycle time of a flash
1 Ω = R+ = {x|x > 0}: A1 = (1, ∞), A2 = [1, 2]
2 Ω = {x|1.5 < x < 5}: A1 = (1.5, 3), A2 = (2, 4)
3 Ω = {low, medium, high}:

A1 = {low, medium} , A2 = {medium}.


Dung Nguyen Probability and Statistics 6/77
Probability

Operations
Conjunctions NOT AND OR BUT
Operators A AB A + B A − B
Definition
1 Complement: A = Ω\A. Also denoted by A′.
2 Product = Intersection:

AB = {x : x ∈ A and x ∈ B} .
3 Sum = Union: A + B = {x : x ∈ A or x ∈ B} .
A = “You pass this course”
B = “You pass the course of L. Algebra”
Dung Nguyen Probability and Statistics 7/77
Probability

Algebra of events’ operations


Proposition (De Morgan’s Rules)
1 A + B = A B.

2 AB = A + B.

Dung Nguyen Probability and Statistics 8/77


Probability

What is Probability?
The likelihood or chance that a
particular outcome or event from a
random experiment will occur.
A number in the [0,1] interval.

Dung Nguyen Probability and Statistics 9/77


Probability

Types of Probability
Subjective probability is a “degree of
belief”, derived from an individual’s
personal judgment =⇒ Biased
Relative frequency probability: how
often an event occurs over a very large
sample space.
Probability with equally likely
outcomes: Ω consists of N possible
outcomes that are equally likely, the
probability of each outcome is 1/N .
Dung Nguyen Probability and Statistics 10/77
Probability Modern probability

Three Axioms
Denote by A the collection of all events.
Probability is a function
P : A → [0, 1]
such that
1 P(A) ≥ 0

2 P(Ω) = 1.

3 For two disjoint events A, B

P(A + B) = P(A) + P(B)


For any A ∈ A, P(A): the probability of A.
Dung Nguyen Probability and Statistics 11/77
Probability Modern probability

Properties of Probability
1 0 ≤ P(A) ≤ 1
2 P(Ω) = 1 and P(∅) = 0.
Probability of Certainty is 1
Probability of Imposibility is 0
Probability Zero Does Not Mean Impossible.
3 P(A) = 1 − P(A)
4 For two disjoint events A, B
P(A + B) = P(A) + P(B)
For disjoint events A1, · · · , An,
P (A1 + · · · + An) = P(A1) + · · · + P(An)
Dung Nguyen Probability and Statistics 12/77
Probability Modern probability

Example
2 If three fair coins are tossed, what is
the probability that three faces will
not be the same?

Dung Nguyen Probability and Statistics 13/77


Probability Modern probability

Example
2 If three fair coins are tossed, what is
the probability that three faces will
not be the same?

3 Birthday Problem. Find the probability


that, in a set of 10 randomly chosen
people, at least one pair of them will
have the same birthday.

Dung Nguyen Probability and Statistics 13/77


Probability Modern probability

Addition Rule
1 For two events
P(A + B) = P(A) + P(B) − P(AB)
2 For three events
P(A + B + C) = P(A) + P(B) + P(C)
− P(AB) − P(AC) − P(BC)
+ P(ABC)
Note the alternating signs.

Dung Nguyen Probability and Statistics 14/77


Probability Modern probability

Addition Rule
In general,
!
X X
P Ai = P(Ai)
i i
X
− P(AiAj)
i<j
X
+ P(AiAjAk ) − · · ·
i,j,k

Dung Nguyen Probability and Statistics 15/77


Probability Modern probability

Example 4 - Semiconductor
Wafers
Consider the semiconductor wafer data in
the table below. A wafer is randomly
selected from the batch.
Contamination Location of Tool Total
level of wafers Center Edge
Low 514 68 582
High 112 246 358
Total 626 314 940
Dung Nguyen Probability and Statistics 16/77
Probability Modern probability

H = high concentrations of contaminants.


Then P(H) = 358/940.
C = the wafer being located at the
center of a sputtering tool. Then
P(C) = 626/940.
P(HC) = 112/940
246 + 112 + 514
P(H + C) = =
940
(246 + 112) + (514 + 112) − 112
= 0.9277
940
358 + 626 − 112
P(H) + P(C) − P(HC) = = 0.9277
940
Dung Nguyen Probability and Statistics 17/77
Probability Modern probability

Example
5 A patient arrives at a doctor’s office
with a sore throat and low-grade fever.
After an exam, the doctor concludes that
he has a bacterial infection or a viral
infection. The doctor concludes that
there is a probability of 0.7 that he
has a bacterial infection and a
probability of 0.4 that he has a viral
infection. What is the probability that
he has both infections?
Dung Nguyen Probability and Statistics 18/77
Probability Modern probability

Example
6 Suppose that both Saturday and Sunday
each have probability 0.5 to get rain
and that the probability is p that it
rains both days. How does the
probability of rain during the weekend
depend on p?

Dung Nguyen Probability and Statistics 19/77


Conditional Probability Conditional Probability

Conditional Probability
P(B|A) is the probability of event B
occurring, given that event A has
already occurred.
A communications channel has an error
rate of 1 per 1000 bits transmitted.
Errors are rare, but do tend to occur in
bursts. If a bit is in error, the
probability that the next bit is also in
error is greater that
Dung Nguyen Probability and Statistics 20/77
Conditional Probability Conditional Probability

Conditional Probability
Conditional probability of A given B
P(AB)
P(A|B) =
P(B)
Visually, conditional probability is the
shaded area

Dung Nguyen Probability and Statistics 21/77


Conditional Probability Conditional Probability

Example 7 - Flaws
There are 4 possibilities conditioned on
flaws in the below table.
Defective Surface Flaws Total
Yes (F) No (F’ )
Yes (D) 10 18 28
No (D’ ) 30 342 372
Total 40 360 400
Compute P(F), P(D), P(F|D), P(D|F).

Dung Nguyen Probability and Statistics 22/77


Conditional Probability Conditional Probability

Example 8 - Sampling Without


Replacement
A batch of 50 parts contains 10 made by
Tool 1 and 40 made by Tool 2. Select 2
parts randomly. What is the probability
that the 1st part came from Tool 1 AND the
2nd part came from Tool 2?

Dung Nguyen Probability and Statistics 23/77


Conditional Probability Conditional Probability

P(E1) = P(1st part came from Tool 1) = 10/50


P(E2|E1) = P(2nd part came from Tool 2
if 1st part came from Tool 1) = 40/49
Therefore
P(E1E2) = P(1st part came from Tool 1
and 2nd part came from Tool 2)
= (10/50)(40/49) = 8/49
The product rule:
P(AB) = P(A)P(B|A) = P(BA) = P(B)P(A|B)
Dung Nguyen Probability and Statistics 24/77
Conditional Probability Conditional Probability

Example
9 Roll two dice and observe the numbers
coming up.

Dung Nguyen Probability and Statistics 25/77


Conditional Probability Conditional Probability

Example
9 Roll two dice and observe the numbers
coming up.
a Define two events by: A=“the sum is six,”
and B=“the numbers are not equal.” Find and
compare P(B) and P(B|A).

Dung Nguyen Probability and Statistics 25/77


Conditional Probability Conditional Probability

Example
9 Roll two dice and observe the numbers
coming up.
a Define two events by: A=“the sum is six,”
and B=“the numbers are not equal.” Find and
compare P(B) and P(B|A).
b Let E=“the number showing on the first die
is even,” and F=“the sum of the numbers
showing is seven.” Find and compare P(F)
and P(F|E).

Dung Nguyen Probability and Statistics 25/77


Conditional Probability Conditional Probability

Example
10 Consider the tossing of a pair of dice.
What is the probability of a number
greater than 4 with the second die if a
number less than 4 turned up on the
first die?

Dung Nguyen Probability and Statistics 26/77


Conditional Probability Independence of events

Independence
Repeated independent trials.
The outcome of any trial of the
experiment does not influence or affect
the outcome of any other trial.
The trials are said to be physically
independent.
Physical independence is a belief.
It cannot be proved that the trials are
independent; we can only believe.
Dung Nguyen Probability and Statistics 27/77
Conditional Probability Independence of events

Independence of two events


Definition
A is independent of B if
P(A|B) = P(A)
That is, knowing B occurred doesn’t impact
whether A occurred.
The following statements are equivalent
1 A and B are 3 P(B|A) = P(B)
independent 4 P(AB) = P(A)P(B)
2 P(A|B) = P(A)
Dung Nguyen Probability and Statistics 28/77
Conditional Probability Independence of events

The case of Sally Clark


Solicitor Sally Clark
was the victim of a
miscarriage of justice
when she was found
guilty (in 1999) for the
murder of two children
(Christopher, 11 weeks,
1996)+(Harry, 8 weeks,
1997).
Dung Nguyen Probability and Statistics 29/77
Conditional Probability Independence of events

The case of Sally Clark


convicted in November
1999
1st appeal (October
2000) dismissed
2nd appeal (January
2003), released
Died in her home in
March 2007 from alcohol
poisoning
Dung Nguyen Probability and Statistics 30/77
Conditional Probability Independence of events

The case of Sally Clark


Sir Roy Meadow
Studied medicine at
Worcester College, Oxford
British paediatrician at
St James’s University
Hospital.
Knighted for services to
child health in 1998.

Dung Nguyen Probability and Statistics 31/77


Conditional Probability Independence of events

The case of Sally Clark


“Meadow’s Law”: “In a
single family, one sudden
infant death is a tragedy,
two is suspicious and
three is murder, until
proved otherwise”.
An expert witness in cases
of suspected child abuse
and murder.
Dung Nguyen Probability and Statistics 32/77
Conditional Probability Independence of events

SIDS = Sudden infant death syndrome = cot


death = crib death = the sudden
unexplained death of a child of less than
one year of age

Dung Nguyen Probability and Statistics 33/77


Conditional Probability Independence of events

The argument
Sir Roy Meadow testified that
The frequency of SIDS in an affluent
family non-smoking families is about 1
in 8500.
The chance of two children from an
affluent family suffering SIDS was
(1/8500)2 = 1/73M .

Dung Nguyen Probability and Statistics 34/77


Conditional Probability Independence of events

The Royal Statistical Society in 2001


issued a press release that summed up the
two major flaws in Meadow’s argument.
Dung Nguyen Probability and Statistics 35/77
Conditional Probability Independence of events

The first major flaw


1 P(A1A2) ̸= P(A1)P(A2)
There is strong evidence that the SIDS does
have genetic or environmental factors that
may correlate within a family.
P(second death|first death) = 1/77

Dung Nguyen Probability and Statistics 36/77


Conditional Probability Independence of events

The second major flaw


2 P(murder|evidence) ̸= P(evidence|murder).
Suppose that a DNA sequence occurs in 1 in
10000 people. Does this mean that if a
suspect ’s DNA matches that found at a crime
scene, the probability that he is guilty is
10000:1.
1 million =⇒ The DNA gives of odds of
100:1 against the suspect being guilty.

Dung Nguyen Probability and Statistics 37/77


Conditional Probability Independence of events

Example
11 Consider a random experiment in which a
fair coin is flipped and a die is
rolled, with A denoting the event that
the coin shows a head and B denoting
the event that the die shows number 1.
Are A and B independent?

Dung Nguyen Probability and Statistics 38/77


Conditional Probability Independence of events

Example
12 Suppose a random experiment is to roll a
single die. Let A be the event that
the outcome is even, and let B be the
event that the outcome is a multiple of
three. Are A and B independent?

Dung Nguyen Probability and Statistics 39/77


Conditional Probability Independence of events

Independence of three events


Definition (Pairwise independence)
Events A, B, and C are pairwise
independent if
P(AB) = P(A)P(B), P(AC) = P(A)P(C), P(BC) = P(B)P(C)

P(A|B) = P(A), P(B|C) = P(B), P(C|A) = P(C),


P(B|A) = P(B), P(C|B) = P(C), P(A|C) = P(A).

Dung Nguyen Probability and Statistics 40/77


Conditional Probability Independence of events

Example 13
Suppose two fair coins are flipped. Let
A be the events “first coin shows a
head”
B be the event “second coin show a
head”
C be the event “both coins show all
heads or all tails.”
Are A, B, C pairwise independent?

Dung Nguyen Probability and Statistics 41/77


Conditional Probability Independence of events

Independence of three events


Definition (1st)
Events A, B, and C are (mutally)
independent if they are pairwise
independent and P(ABC) = P(A)P(B)P(C).

P(A|B) = P(A), P(B|C) = P(B), P(C|A) = P(C),


P(B|A) = P(B), P(C|B) = P(C), P(A|C) = P(A),
P(A|BC) = P(A), P(B|CA) = P(B), P(C|AB) = P(C),
P(BC|A) = P(BC), P(CA|B) = P(CA), P(AB|C) = P(AB),
Dung Nguyen Probability and Statistics 42/77
Conditional Probability Independence of events

Example 14
Suppose two fair coins are flipped. Let
A be the events “first coin shows a
head”
B be the event “second coin shows a
head”
C be the event “both coins show all
heads or all tails.”
Are A, B, C are (mutually) independent?

Dung Nguyen Probability and Statistics 43/77


Conditional Probability Independence of events

Remark
Stochastic independence does not
necessarily mean that the events are
physically independent.
Physical independence is, in essence, a
property of the events themselves.
Stochastic independence is a property of the
probability measure.
In the future, we shall be using the
word stochastically in conjunction with
the word independent only on rare
occasions.
Dung Nguyen Probability and Statistics 44/77
Conditional Probability Independence of events

Independence of n events
Definition (1st)
The events A1, · · · , An are independent (or
mutually independent) if, for every subset
Ai1 , · · · , Aik of k of these events
(k = 2, 3, · · · , n),
P(Ai1 · · · Aik ) = P(Ai1 ) · · · P(Aik )

Dung Nguyen Probability and Statistics 45/77


Conditional Probability Independence of events

Independence of n events
Definition (2nd)
The events A1, · · · , An are independent (or
mutually independent) if, for every subset
Ai1 , · · · , Aik of k of these events
(k = 2, 3, · · · , n),
P(Ai1 |Ai2 · · · Aik ) = P(Ai1 )

Dung Nguyen Probability and Statistics 46/77


Conditional Probability Independence of events

Example
15 Assume P(H) = p, P(T) = 1 − p for an unfair
coin. Compute P(HTHTT) and
P(get 2H and 3T, in any order).

Dung Nguyen Probability and Statistics 47/77


Conditional Probability Independence of events

Example
15 Assume P(H) = p, P(T) = 1 − p for an unfair
coin. Compute P(HTHTT) and
P(get 2H and 3T, in any order).

16 Suppose that we toss 2 fair dice. Let


E1 denote the event that the sum of the
dice is 6 and F denote the event that
the first die equals 4. Prove that E1
and F cannot be independent.
Dung Nguyen Probability and Statistics 47/77
Conditional Probability Independence of events

Example
17 A system composed of n separate
components is said to be a parallel
system if it functions when at least one
of the components functions. For such a
system, if component i, which is
independent of the other components,
functions with probability pi, i = 1, . . . , n,
what is the probability that the system
functions?
Dung Nguyen Probability and Statistics 48/77
Conditional Probability Independence of events

Example 18 - XOR gate


Let A and B respectively denote the events
that inputs #1 and #2 of an Exclusive-OR
gate are logical 1. Assume that A and B
are physically independent (hence they are
stochastically independent) events. Let C
denote the event that the output of the
Exclusive-OR gate is logical 1
C = A ⊕ B = AB ∪ AB

Dung Nguyen Probability and Statistics 49/77


Conditional Probability Independence of events

C = A ⊕ B = AB ∪ AB
1 Is the output of the XOR gate really
independent of the input? Are A and C
independent events?
2 Assume that P(A) = P(B) = 0.500001. Is the
result still the same?

Dung Nguyen Probability and Statistics 50/77


Conditional Probability Independence of events

Probability of a product -
Independent
Proposition
For two independent events A, B,
P(AB) = P(A)P(B)
In general, if A1, . . . , An are independent
events then
P(A1A2 · · · An) = P(A1)P(A2)P(A3) · · · P(An)

Dung Nguyen Probability and Statistics 51/77


Conditional Probability Independence of events

Example 19 - Wafers
Assume the probability that a
semiconductor wafer contains a large
particle of contamination is 0.01 and that
the wafers are independent.If 15 wafers
are analyzed, what is the probability that
no large particles are found?
Solution
P(E1E2 · · · E15) = (0.99)15 = 0.86.

Dung Nguyen Probability and Statistics 52/77


Conditional Probability Independence of events

Probability of a product
Theorem (Multiplication Rule)
For two events A and B
P(AB) = P(A)P(B|A) = P(B)P(A|B)
More generally
P(ABC) = P(A)P(B|A)P(C|AB)
In general
P(A1A2 · · · An) = P(A1)P(A2|A1) · · · P(An|A1A2 · · · An−1)

Dung Nguyen Probability and Statistics 53/77


Conditional Probability Independence of events

Example
20 The probability that a part made in the
1st stage of a machining operation meets
specifications is 0.90. The probability
that it meets specifications in the 2nd
stage, given that met specifications in
the first stage is 0.95. What is the
probability that both stages meet
specifications?

Dung Nguyen Probability and Statistics 54/77


Conditional Probability Independence of events

Example
21 Celine is undecided as to whether to
take a French course or a chemistry
course. She estimates that her
probability of receiving an A grade
would be 12 in a French course and 32 in a
chemistry course. If Celine decides to
base her decision on the flip of a fair
coin, what is the probability that she
gets an A in chemistry?
Dung Nguyen Probability and Statistics 55/77
Conditional Probability Independence of events

Example
22 An ordinary deck of 52 playing cards is
randomly divided into 4 piles of 13
cards each. Compute the probability
that each pile has exactly 1 ace.

Dung Nguyen Probability and Statistics 56/77


The total probability formula

3 The total probability formula

Dung Nguyen Probability and Statistics 57/77


The total probability formula

Theorem (Total probability - Simple form)


P(A) = P(A|B)P(B) + P(A|B)P(B)

Proof.
P(A) = P(AB) + P(AB)
P(AB) = P(A|B)P(B)
P(AB) = P(A|B)P(B)

Dung Nguyen Probability and Statistics 58/77


The total probability formula

Example 23
Information about product failure based on
chip manufacturing process contamination
is given below. Find the probability of
failure.

Probability Level of Probability


of Failure Contamination of Level
0.1 High 0.2
0.005 Not High 0.8

Dung Nguyen Probability and Statistics 59/77


The total probability formula

Let F denote the event that the product


fails.
Let H denote the event that the chip is
exposed to high contamination during
manufacture. Then

P(FH) = 0.02 (P(F|H) = 0.100, P(H) = 0.2)


P(FH ′) = 0.004 (P(F|H ′) = 0.005, P(H ′) = 0.8)
P(F) = P(FH) + P(FH ′) = 0.020 + 0.004 = 0.024

Dung Nguyen Probability and Statistics 60/77


The total probability formula

Example
24 Box I has 3 green and 2 red balls, while
Box II has 4 green and 6 red balls. A
ball is drawn at random from Box I and
transferred to Box II. Then, a ball is
drawn at random from Box II. What is the
probability that the ball drawn from Box
II is green?

Dung Nguyen Probability and Statistics 61/77


The total probability formula

Example
25 In box 1, there are 60 short bolts and
40 long bolts. In box 2, there are 10
short bolts and 20 long bolts. Take a
box at random, and pick a bolt. What is
the probability that you chose a short
bolt?

Dung Nguyen Probability and Statistics 62/77


The total probability formula

Theorem (Total probability)


k
X k
X
P(A) = P(ABi) = P(A|Bi)P(Bi)
i=1 i=1
where BiBj = ∅ (i ̸= j) and S = B1 · · · Bk
(disjoint).
Remark
The numerator is always one of the terms
in the denominator.
P(A) is between the smallest of P(A|Bi)
and the largest of P(A|Bi).
Dung Nguyen Probability and Statistics 63/77
The total probability formula

Example 26 - Semiconductor
Failures
Continuing the discussion of contamination
during chip manufacture, find the
probability of failure.
Probability Level of Probability
of Failure Contamination of Level
0.100 High 0.2
0.010 Medium 0.3
0.001 Low 0.5
Dung Nguyen Probability and Statistics 64/77
The total probability formula

Solution
Let F denote the event that a chip fails
Let H, M, L denote the event that a chip
is exposed to high, medium, low levels of
contamination
P(F) = P(F|H)P(H) + P(F|M )P(M ) + P(F|L)P(L)
= (0.1)(0.2) + (0.01)(0.3) + (0.001)(0.5) = 0.0235

Dung Nguyen Probability and Statistics 65/77


The total probability formula

Example
27 A bin contains 3 different types of disposable
flashlights. The probability that a type 1
flashlight will give over 100 hours of use is
0.7, with the corresponding probabilities for
type 2 and type 3 flashlights being 0.4 and 0.3,
respectively. Suppose that 20% of the
flashlights in the bin are type 1, 30% are type
2, and 50% are type 3. What is the probability
that a randomly chosen flashlight will give more
than 100 hours of use?
Dung Nguyen Probability and Statistics 66/77
Bayes’s Formula

4 Bayes’s Formula
Simple form
Extended form

Dung Nguyen Probability and Statistics 67/77


Bayes’s Formula Simple form

Lemma (Bayes’s lemma)


P(A|B)P(B)
P(B|A) =
P(A)

P(A|B)P(B)
P(B|A) =
P(A)
P(A) = P(A|B)P(B) + P(A|B)P(B)
Bayes’s Formula - Simple form
P(A|B)P(B)
P(B|A) =
P(A|B)P(B) + P(A|B)P(B)
Dung Nguyen Probability and Statistics 68/77
Bayes’s Formula Simple form

Example
28 In answering a question on a
multiple-choice test, a student either
knows the answer or guesses. The
probability that the student knows the
answer is 0.8. Assume that a student
who guesses at the answer will be
correct with probability 1/4. What is
the conditional probability that a
student knew the answer to a question
given that he answered it correctly?
Dung Nguyen Probability and Statistics 69/77
Bayes’s Formula Simple form

Example
29 A laboratory blood test is 95 percent
effective in detecting a certain disease
when it is, in fact, present. However,
the test also yields a “false positive”
result for 1 percent of the healthy
people tested. If 0.5 percent of the
population actually has the disease,
what is the probability that a person
has the disease given that the test
result is positive?
Dung Nguyen Probability and Statistics 70/77
Bayes’s Formula Simple form

Example
30 An e-mail filter is planned to separate
valid e-mails from spam. The word free
occurs in 60% of the spam messages and
only 4% of the valid messages. Also,
20% of the messages are spam. Determine
the following probabilities:

Dung Nguyen Probability and Statistics 71/77


Bayes’s Formula Simple form

Example
30 An e-mail filter is planned to separate
valid e-mails from spam. The word free
occurs in 60% of the spam messages and
only 4% of the valid messages. Also,
20% of the messages are spam. Determine
the following probabilities:
a The message contains free.

Dung Nguyen Probability and Statistics 71/77


Bayes’s Formula Simple form

Example
30 An e-mail filter is planned to separate
valid e-mails from spam. The word free
occurs in 60% of the spam messages and
only 4% of the valid messages. Also,
20% of the messages are spam. Determine
the following probabilities:
a The message contains free.
b The message is spam given that it contains
free.

Dung Nguyen Probability and Statistics 71/77


Bayes’s Formula Simple form

Example
30 An e-mail filter is planned to separate
valid e-mails from spam. The word free
occurs in 60% of the spam messages and
only 4% of the valid messages. Also,
20% of the messages are spam. Determine
the following probabilities:
a The message contains free.
b The message is spam given that it contains
free.
c The message is valid given that it does not
contain free.

Dung Nguyen Probability and Statistics 71/77


Bayes’s Formula Simple form

Example
31 A recreational equipment supplier finds
that among orders that include tents,
40% also include sleeping mats. Only 5%
of orders that do not include tents do
include sleeping mats. Also, 20% of
orders include tents. Determine the
following probabilities:

Dung Nguyen Probability and Statistics 72/77


Bayes’s Formula Simple form

Example
31 A recreational equipment supplier finds
that among orders that include tents,
40% also include sleeping mats. Only 5%
of orders that do not include tents do
include sleeping mats. Also, 20% of
orders include tents. Determine the
following probabilities:
a The order includes sleeping mats.

Dung Nguyen Probability and Statistics 72/77


Bayes’s Formula Simple form

Example
31 A recreational equipment supplier finds
that among orders that include tents,
40% also include sleeping mats. Only 5%
of orders that do not include tents do
include sleeping mats. Also, 20% of
orders include tents. Determine the
following probabilities:
a The order includes sleeping mats.
b The order includes a tent given it includes
sleeping mats.

Dung Nguyen Probability and Statistics 72/77


Bayes’s Formula Extended form

P(A|Bj)P(Bj)
P(Bj|A) =
P(A)
Xk
P(A) = P(A|Bi)P(Bi)
i=1

Theorem (Bayes’s Formula - Extended form)


P(A|Bj)P(Bj)
P(Bj|A) = k
X
P(A|Bi)P(Bi)
i=1
Dung Nguyen Probability and Statistics 73/77
Bayes’s Formula Extended form

Example I
32 Identify the source of a defective item.
There are 3 machines: M1, M2, M3.
P(defective): 0.01, 0.02, 0.025,
respectively. The percent of items made
that come from each machine is:
50%, 30%, and 20%, respectively.
Bayes’s Formula Extended form

Example II
33 A bin contains 3 different types of
disposable flashlights. The probability
that a type 1 flashlight will give over
100 hours of use is 0.7, with the
corresponding probabilities for type 2
and type 3 flashlights being 0.4 and
0.3, respectively. Suppose that 20% of
them are type 1, 30% are type 2, and 50%
are type 3.
Dung Nguyen Probability and Statistics 75/77
Bayes’s Formula Extended form

Example III
What is the probability that a randomly
chosen flashlight will give more than
100 hours of use? Given that a
flashlight lasted over 100 hours, what
is the conditional probability that it
was a type 1 flashlight?
Bayes’s Formula Extended form

Events
Disjoint
Independent
Pairwise
Mutual
Operators
A -> Complement rule
A + B -> Addition rule
AB -> Product rule
Total probability formula
Bayes’ formula
Dung Nguyen Probability and Statistics 77/77

You might also like