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

Bays Theorem

This document provides an overview of Bayes' theorem, including: - The statement of Bayes' theorem which gives two ways to calculate conditional probabilities. - An extension of Bayes' theorem for calculating probabilities when events are mutually exclusive. - Two examples that demonstrate how to apply Bayes' theorem to calculate conditional probabilities.

Uploaded by

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

Bays Theorem

This document provides an overview of Bayes' theorem, including: - The statement of Bayes' theorem which gives two ways to calculate conditional probabilities. - An extension of Bayes' theorem for calculating probabilities when events are mutually exclusive. - Two examples that demonstrate how to apply Bayes' theorem to calculate conditional probabilities.

Uploaded by

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

10.

Bayes' Theorem

Let E1 and E2 be two mutually exclusive events forming a partition of


the sample space S and let E be any event of the sample space such
that P(E) ≠ 0.
On this page...

 The Theorem
 Bayes' Theorem for mutually exclusive events

Example

The sample space S is described as "the integers 1 to 15" and is


partitioned into:

E1 = "the integers 1 to 8" and


E2 = "the integers 9 to 15".
If E is the event "even number" then we have the following:
[Recall from Conditional Probability that the notation P(E1 | E) means "the probability of
the event E1 given that E has already occurred".]

Statement of Bayes' Theorem


The probabilities for the situation described above is given by Bayes'
Theorem, which can be calculated in two ways:

So for our example above, checking both items of this equation:

We get the same result using the second form:


Extending Bayes' Theorem for Mutually Exclusive Events
Bayes' Theorem can be extended as follows:

If E1, E2, ... , Ek are mutually exclusive events forming partitions of the
sample space S and if E is any event of S such that P(E) ≠ 0, then

EXAMPLE 1

Of all the smokers in a particular district, 40% prefer brand A and 60%
prefer brand B. Of those smokers who prefer brand A, 30% are
females, and of those who prefer brand B, 40% are female. What is
the probability that a randomly selected smoker prefers brand A, given
that the person selected is a female?

Answer

S = "smokers in the district",

E1 = "prefer brand A",


E2 = "prefer brand B" and
E is the event "female".
Or equivalently:

_xclick mbourne@intmath Interactive Mathe 1 http://w w w .intma http://w w w .intma

Any comments? USD 0 SG PP-DonationsBF

Please support IntMath!

EXAMPLE 2

There are 3 urns A, B and C each containing a total of 10 marbles of


which 2, 4 and 8 respectively are red. A pack of cards is cut and a
marble is taken from one of the urns depending on the suit shown - a
black suit indicating urn A, a diamond urn B, and a heart urn C. What
is the probability a red marble is drawn?

If somebody secretly cut the cards and drew out a marble and then
announced to us a red marble had in fact been drawn, could we
compute the probability of the cut being, say, a heart (or more
generally, can we compute the probability of a specified prior event
given that the subsequent event did occur)?
Answer

Conclusion: The probabilities add to 1, so we can compute the


probability of a specified event given the subsequent event did occur.
When to Apply Bayes' Theorem

Part of the challenge in applying Bayes' theorem involves recognizing the types of problems that
warrant its use. You should consider Bayes' theorem when the following conditions exist.

 The sample space is partitioned into a set of mutually exclusive events { A1, A2, . . . ,
An }.
 Within the sample space, there exists an event B, for which P(B) > 0.
 The analytical goal is to compute a conditional probability of the form: P( Ak | B ).
 You know at least one of the two sets of probabilities described below.
o P( Ak ∩ B ) for each Ak
o P( Ak ) and P( B | Ak ) for each Ak

Bayes Rule Calculator

Use the Bayes Rule Calculator to compute conditional probability, when Bayes' theorem can be
applied. The calculator is free, and it is easy to use. It can be found under the Stat Tools tab,
which appears in the header of every Stat Trek web page.

Bayes Rule Calculator

Sample Problem

Bayes' theorem can be best understood through an example. This section presents an example
that demonstrates how Bayes' theorem can be applied effectively to solve statistical problems.

Example 1
Marie is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has
rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow.
When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't
rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the
day of Marie's wedding?

Solution: The sample space is defined by two mutually-exclusive events - it rains or it does not
rain. Additionally, a third event occurs when the weatherman predicts rain. Notation for these
events appears below.

 Event A1. It rains on Marie's wedding.


 Event A2. It does not rain on Marie's wedding
 Event B. The weatherman predicts rain.

In terms of probabilities, we know the following:


 P( A1 ) = 5/365 =0.0136985 [It rains 5 days out of the year.]
 P( A2 ) = 360/365 = 0.9863014 [It does not rain 360 days out of the year.]
 P( B | A1 ) = 0.9 [When it rains, the weatherman predicts rain 90% of the time.]
 P( B | A2 ) = 0.1 [When it does not rain, the weatherman predicts rain 10% of the time.]

We want to know P( A1 | B ), the probability it will rain on the day of Marie's wedding, given a
forecast for rain by the weatherman. The answer can be determined from Bayes' theorem, as
shown below.

P( A1 ) P( B | A1 )

P( A1 | B ) =  

P( A1 ) P( B | A1 ) + P( A2 ) P( B | A2 )

P( A1 | B ) = (0.014)(0.9) / [ (0.014)(0.9) + (0.986)(0.1) ]

P( A1 | B ) = 0.111

Note the somewhat unintuitive result. Even when the weatherman predicts rain, it only rains only
about 11% of the time. Despite the weatherman's gloomy prediction, there is a good chance that
Marie will not get rained on at her wedding.

You might also like