Prob Zoompdf
Prob Zoompdf
Probability
Outline I
1 Probability
2 Conditional Probability
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
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}:
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
2 AB = A + B.
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.
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.
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?
Example
2 If three fair coins are tossed, what is
the probability that three faces will
not be the same?
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.
Addition Rule
In general,
!
X X
P Ai = P(Ai)
i i
X
− P(AiAj)
i<j
X
+ P(AiAjAk ) − · · ·
i,j,k
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
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?
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
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).
Example
9 Roll two dice and observe the numbers
coming up.
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).
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).
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?
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
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 .
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?
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?
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?
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?
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 )
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 )
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).
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).
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
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?
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)
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.
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)
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?
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.
Proof.
P(A) = P(AB) + P(AB)
P(AB) = P(A|B)P(B)
P(AB) = P(A|B)P(B)
Example 23
Information about product failure based on
chip manufacturing process contamination
is given below. Find the probability of
failure.
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?
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?
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
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
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:
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.
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.
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.
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:
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.
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.
P(A|Bj)P(Bj)
P(Bj|A) =
P(A)
Xk
P(A) = P(A|Bi)P(Bi)
i=1
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