0% found this document useful (0 votes)
365 views16 pages

Bayes Theorem

The document explains Bayes' theorem and the law of total probability. It provides examples of how to calculate probabilities using these concepts, such as calculating the probability a car rented from a company breaks down based on the breakdown rates from different rental agencies. It also explains how to calculate the probability someone truly has a disease given they tested positive using Bayes' theorem.

Uploaded by

Eisar Khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
365 views16 pages

Bayes Theorem

The document explains Bayes' theorem and the law of total probability. It provides examples of how to calculate probabilities using these concepts, such as calculating the probability a car rented from a company breaks down based on the breakdown rates from different rental agencies. It also explains how to calculate the probability someone truly has a disease given they tested positive using Bayes' theorem.

Uploaded by

Eisar Khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

Law of Total Probability

Sometimes it is not possible to calculate the probability of an occurrence of an event A however, it may be possible to find P (A | B) and P (A | B c) for some event B.

Let B be an event with P (B) > 0 and P (B c) > 0. Then for any event A, P (A) = P (A | B)P (B) + P (A | B c) P (B c)

We know that P (A) = P (AB) + P (A Bc)

Substitute in the conditional probability


P (AB) = P (A | B)P (B) P (A Bc) = P (A | B c) P (B c)

The Law of Total Probability remains


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

An insurance company that rents 40% of the cars for its customers from agency I and 60% from agency II. If 6% of the cars from agency I and 5% of the cars from agency II break down, what is the probability that a car rented by this company breaks down?

P (car breaks down from the insurance company) = (.06)(.4) + (.05)(.6) = .054 or 5.4%

Bayes Theorem
Let {B1, B2, , B n} be a subset of the sample space S of an experiment. If for i = 1, 2, , n, P (Bi) > 0, then for any event A of S with P (A) > 0, P (B k | A)
=

P ( A | Bk ) P ( Bk ) P ( A | B1 ) P ( B1 ) P ( A | B2 ) P ( B2 ) ... P ( A | Bn ) P ( Bn )

P(B) is the prior probability and P(B | A) is the posterior probability

Proof is very simple

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

, conditional probability

Rearranged becomes: P (A B) = P (B) P (A | B) P (BA) = P (A) P (B | A)


Therefore P (B)P (A | B) = P (A)P (B | A) Solve for the P (B | A)

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

A box contains seven red and thirteen blue balls. Two balls are selected at random and are discarded without their colors being seen. If a third ball is drawn randomly and observed to be red, what is the probability that both of the discarded balls were blue?

P( R | BB) P( BB) P BB | R P( R | BB) P( BB) P( R | BR) P( BR) P( R | RR) P( RR)

7 39 * 18 95 0.46 7 39 6 91 5 21 * * * 18 95 18 190 18 190

A cancer is found in 1 in every 2000 people. If a person has the disease there is a 90% the test will result positive. If a person does not have the disease, the test will result in a false positive 1% of the time. The probability that a person with a positive test actually has the cancer is,

1 *.90 2000 P C | P .043 1 1999 *.90 *.01 2000 2000

So we see Bayes Theorem estimates if a person tests positive for a disease if he or she truly has the disease

Q1. The chances that doctor A will diagnose a disease X correctly is 60 % . The chances that a patient will die by his treatment after correct diagnosis is 40% and the chances of death after wrong diagnosis is 70% . A patient of doctor A who had disease X , died. What is the chance that his disease was diagnosed correctly.
Q2. In a bolt factory, machines A,B,C manufacture respectively 25% , 35% and 40% of the total. Of their output 5, 4 and 2% are defective bolts. A bolt is drawn at random from the product and is found to be defective . What is the probability that it was manufactured by machine B.

P C 0.60 P W 0.40

P D | C 0.40 P D | W 0.70

P C P D | C PD | C P W P D | W P C P D | C 0.6*0.4 .24 6 0.6*0.4 0.7 *0.4 .52 13

let E denotethe event of its benig defective. P A .25 P E | A .05 P B .35 P E | B .04 P C .40 P E | C .02

P B P E | B 28 P B | E P A P E | A P B P E | B P C P E | C 69

The probability that a person can hit a target is 3/5 and the probability that another person can hit the same target is 2/5 . But the first person can fire 8 shoots in the time the second person fire 10 shoots . They fire together. What is the probability that the second person shoots the target.

3 2 P A | B1 , P A | B2 5 5 The ratio of theshoots of the first person to those of thesecond person in the same time is 8/10 4 P B1 = P B2 5

P B2 P A / B2 P B2 / A P B1 P A / B1 P B2 P A / B2 P B2 2 5 1 5 6 / 5 1 11

4 3 2 P B2 P B2 5 5 5

You might also like