KEMBAR78
Lecture 16 - Intro To Probability | PDF | Probability | Email Spam
0% found this document useful (0 votes)
41 views43 pages

Lecture 16 - Intro To Probability

Uploaded by

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

Lecture 16 - Intro To Probability

Uploaded by

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

2

MATH – 361
Introduction to Probability and Statistics

Lecture No. 16

Introduction to Probability

Reference: Ch # 2, Sec 2.1, Text Book

No. of Slides: 43
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

Addition Law

:
9

Addition Law

Solution:
10

Addition Law

:
11

Addition Law
12

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


13

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


14

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)=
15

Conditional Probability

Similarly
16

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.
17

Conditional Probability

Example: Two coins are tossed. What is the


conditional probability the two heads result, given that
there is at least one head?

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
18

Conditional Probability
Solution:

Then we need

Since
19

Conditional Probability
20

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)


21

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


22

Conditional Probability & Independence

Let E = exactly one head appear

F = at least one head has already appeared


23

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


24

Conditional Probability & Independence

Let E = both children are boys

F = at least one of them is a boy


25

Bayes’ Theorem Bayes' Theorem is a simple mathematical formula used for


calculating conditional probabilities.

Bayes’ Theorem is a way of finding a probability when we know certain


other probabilities

Formula
26

Bayes’ Theorem

Which tells us : How often A happens given that B happens, written P(A|B)
When we know : How often B happens given that A happens, written P(B|A)
And how likely A is on its own, written P(A)
And how likely B is on its own, written P(B)
27

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.

This equation, known as Bayes Theorem is the basis of statistical


inference
28

Bayes’ Theorem

More Generalized Definition

Let , , … is a collection of mutually exclusive and exhaustive events with


probability P(), I = 1, 2, 3…k. Then for any event B for which P(B) > 0
29

Bayes’ Theorem

More Generalized Definition

In simple words we can say that

Joint probability for two events A and B mean


30

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?
31

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
32

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
33

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
34

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
35

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) = ?
36

Bayes’ Theorem

Using Bayes’ Theorem:

• P(Spam | Free) = 0.50 * 0.20 / (0.50 * 0.20 + 0.50 * 0.001)

• P(Spam | Free) = 0.995


37

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:
𝐸
𝐸
38

Probability of Complement of an Event



39

Probability of Complement of an Events

:
40

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
41

Practice Problem 2
42

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
43

Study Links

 https://www.youtube.com/watch?v=XQoLVl31ZfQ&vl=en

 https://www.youtube.com/watch?v=k6Dw0on6NtM

 https://www.youtube.com/watch?v=OYT0AcuLXu8

 https://brilliant.org/wiki/bayes-theorem/

You might also like