2
MATH – 361
Introduction to Probability and Statistics
Introduction to Probability
3
Desired Learning Objectives
After this lectures students will be able to
Interpret laws of probability
Use laws of probability in different problems
Interpret Bayes’ Theorem
Use conditional probability and Bayes’ Theorem
4
Probability Rules
5
Laws of Probability
1. Addition Law
(a) Mutually Exclusive Events
(b) Not Mutually Exclusive Events
2. Multiplication law
(a) Independent Events
(b) Dependent Events
6
Laws of Probability
Addition law
(a) For Not Mutually Exclusive Events
P ( A B ) P ( A) P ( B ) P ( A B )
(b) For Mutually Exclusive Events
P ( Aor B ) P ( A B ) P ( A) P ( B )
7
Laws of Probability
Multiplication law
(a) For Dependent Events ( Conditional ) P ( A B ) P ( A).P ( B / A)
P ( B ).P ( A / B )
(b) For Independent Events
P ( A and B ) P ( A B ) P ( A).P ( B )
8
9
10
Addition Law
:
11
Addition Law
:
12
Addition Law
Solution:
13
Addition Law
:
14
Addition Law
:
;
15
Safi is going to graduate from an industrial engineering
department in a university by the end of the semester. After
being interviewed at two companies he likes, he assesses that
his probability of getting an offer from company A is 0.8, and
his probability of getting an offer from company B is 0.6. If he
believes that the probability that he will get offers from both
companies is 0.5, what is the probability that he will get at least
one offer from these two companies?
:
16
What is the probability of getting a total of 7 or 11
when a pair of fair dice is tossed?
17
Multiplication Law
Example:
Two cards are drawn from a well-shuffled pack of 52 cards. Find the
probability that they are both aces if the first card is
(i) replaced (ii) not replaced before the 2nd attempt
Solution: Let A is ace on the first draw and B denote the event ace on the
second draw
(i) In case of replacement, event A & B are independent
P(both cards are aces) = P(A∩B) = P(A).P(B) = 4/52.4/52 = 1/169
18
Multiplication Law
Example:
Two cards are drawn from a well-shuffled pack of 52 cards Find the
probability that they are both aces if the first card is
(i) replaced (ii) not replaced before the 2nd attempt
Solution:
(ii) In case of not replaced, event A & B are dependent
P(A∩B) = P(A).P(B/A) = 4/52.3/51 = 1/221
19
Conditional Probability
Definition
The probability that one event happens given that another event is
already known to have happened is called a conditional probability
Suppose we know that event A has happened. Then the probability that
event B happens given that event A has happened is denoted by P(B|A)
P(B|A)=
21
Conditional Probability
Example: A card is drawn from an ordinary deck of 52 playing cards
and is found to be of red color. What is the probability that it is of
diamond suit?
22
Conditional Probability
Example: A card is drawn from an ordinary deck of 52 playing cards
and is found to be of red color. What is the probability that it is of
diamond suit?
Solution: Let R = card drawn is red
D = card drawn is of diamond suit
P(D/R) = 13/26 = ½
Note: The information, that the card is red, has reduced the possibility space from
52 to 26 cards.
23
Conditional Probability
Example:
The probability that a regularly scheduled flight departs on time is P(D) = 0.83;
the probability that it arrives on time is P(A) = 0.82; and the probability that it
departs and arrives on time is P(D ∩A) = 0.78.
(a) Find the probability that a plane arrives on time, given that it departed
on time.
(b) Find the probability that a plane departed on time, given
that it has arrived on time.
Solution: . . . . . . . . .
24
25
Conditional Probability
Example: Two coins are tossed. What is the conditional
probability the two heads result, given that there is at least one
head?
26
Conditional Probability
Solution: The sample space S for this experiment is
S = {HH, HT, TH, TT}
Let A represent the event that two heads appear,
and B, the event that there is at least one head,
Then we need
27
Conditional Probability & Independence
Two events A and B are independent if the occurrence of one event does
not change the probability that the other event will happen.
In other words, events A and B are independent if
P(A | B) = P(A) and P(B | A) = P(B)
28
Conditional Probability & Independence
Example
A fair coin is tossed twice. What is the probability that exactly one head
appear given that at least there is one head occurred
Solution
Here
S = { HH ,HT, TH, TT } ; n(S) = 4
29
Conditional Probability & Independence
Let E = exactly one head appear
F = at least one head has already appeared
30
Conditional Probability & Independence
Example
A family has 2 children. What is the probability that both
children are boys given that at least one of them is a boy
Solution
Here
S = { bb, bg, gb, gg} ; n(S) = 4
31
Conditional Probability & Independence
Let E = both children are boys
F = at least one of them is a boy
32
Bayes’ Theorem
33
Bayes’ Theorem
Bayes’ Theorem is a way of finding a probability when we know certain
other probabilities
Formula
Bayes' Theorem is a simple mathematical formula
used for calculating conditional probabilities.
34
Medical Diagnosis: Given certain symptoms (event B), what is the
probability that a person has a specific disease (event A)?
Spam Filtering: Given certain words present in an email (event B),
what is the probability that the email is spam (event A)?
Quality Control: Given a defective product (event B), what is the
probability that it was produced by a particular machine (event A)?
35
Bayes’ Theorem
Proof of Bayes Theorem The probability of two events A and B happening,
P(A∩B), is the probability of A, P(A), times the probability of B given that A has
occurred, P(B|A)
On the other hand, the probability of A and B is also
equal to the probability of B times the probability of A
given B.
36
BAYES' THEOREM
Bayes' theorem helps in updating our beliefs or understanding
about a situation based on new evidence or information.
To use Bayes' theorem, you need to know the prior probabilities
of events A and B and the conditional probabilities of B given A
and A given B. Then, you can calculate the posterior probability
of event A given event B has occurred using the formula
mentioned above.
37
BAYES' THEOREM : EXAMPLE
Suppose a certain type of cancer affects 1% of the
population. A particular test for this cancer is 90% accurate
in detecting the presence of cancer in individuals who have
it, and it incorrectly identifies 10% of healthy individuals as
having the cancer.
We want to find out the probability that a person
actually has the cancer given that the test result is positive.
38
BAYES' THEOREM : EXAMPLE
Events:
Event A: Having the cancer (prior probability = 1% or 0.01)
Event B: Test result being positive
Given Probabilities:
39
BAYES' THEOREM : EXAMPLE
40
41
BAYES' THEOREM : EXAMPLE
A factory produces two types of light bulbs, Brand A
and Brand B. Brand A constitutes 60% of the total
production, while Brand B constitutes 40% of the total
production. Brand A has a defect rate of 5%, whereas
Brand B has a defect rate of 3%.
We want to find out the probability that a randomly chosen
defective bulb comes from Brand A.
42
BAYES' THEOREM : EXAMPLE
Events:
Event A: Bulb is from Brand A (prior probability = 60% or 0.6)
Event B: Bulb is defective
43
BAYES' THEOREM : EXAMPLE
44
Complement Rule
The complement of an event is the collection of all possible elementary
events not contained in event E. The complement of event is
represented by
Complement Rule:
𝐸
𝐸
45
Probability of Complement of an Event
46
Probability of Complement of an Events
:
47
Bayes’ Theorem
Example
A drilling company has estimated a 40% chance of striking oil for their
new well.
A detail test has been scheduled for more information. Historically, 60%
of successful wells have had detailed tests, and 20% of unsuccessful
wells have had detailed tests.
Given that this well has been scheduled for a detailed test, what is the
probability that the well will be successful?
48
49
Bayes’ Theorem
Solution
Let S = successful well ; U = unsuccessful well
P(S) = 0.4 ; P(U) = 0.6
Define the detailed test event as D
Conditional probabilities
P(D/S) = 0.6 and P(D/U) =0.2
50
Bayes’ Theorem
Solution
Revised probabilities
Prior Conditional Joint Revised
Event
Probability Probability Probability Probability
S (Successful) 0.4 0.6 0.4*0.6 = 0.24 0.24/0.36 = .67
U (Unsuccessful) 0.6 0.2 0.6*0.2 = 0.12 0.12/0.36 = .33
Total 0.36
51
Bayes’ Theorem
Solution
Given the detailed test, the revised probability of a successful well has
risen to 0.67 from the original estimate of 0.4
Prior Conditional Joint Revised
Event
Probability Probability Probability Probability
S (Successful) 0.4 0,6 0.4*0.6 = 0.24 0.24/0.36 = .67
U (Unsuccessful) 0.6 0.2 0.6*0.2 = 0.12 0.12/0.36 = .33
Total 0.36
52
Bayes’ Theorem
Example
Spam Assassin works by having users train the system. It looks for
patterns in the words in emails marked as spam by the user
For example, it may have learned that the word “free” appears in 20% of
the emails marked as spam. Assuming 0.1% of non-spam mail includes
the word “free” and 50% of all emails received by the user is spam
Find the probability that a mail is a spam if the word “free” appears in it
53
Bayes’ Theorem
Data Given:
• P(Spam) = 0.50 => P(Non Spam) = 0.50
• P(Free | Spam) = 0.20
• P(Free | Non Spam) = 0.001
• P(Spam | Free) = ?
54
Practice Problem 1
Imagine there is a drug test that is 98% accurate, meaning 98% of the
time it shows a true positive result for someone using the drug and 98%
of the time it shows a true negative result for nonusers of the drug
Next, assume 0.5% of people use the drug. If a person selected at
random tests positive for the drug, find the probability that the person is
actually a user of the drug
55
Practice Problem 2
56
Practice Problem 3
Three coins are tossed . What is the probability of at least two heads appear
given that last coin show tail had already occurred