• No results found

Bayes Theorem. Bayes Theorem- Example. Evaluation of Medical Screening Procedure. Evaluation of Medical Screening Procedure

N/A
N/A
Protected

Academic year: 2021

Share "Bayes Theorem. Bayes Theorem- Example. Evaluation of Medical Screening Procedure. Evaluation of Medical Screening Procedure"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

Bayes’ Theorem

P(C | A) P(A) P(C | A) P(A) + P(C | B) P(B) = P(A | C) = P(E | B) P(B)

P(E | B) P(B) + P(E | A) P(A)

= P(B | E) = P(D | A) P(A) P(D | A) P(A) + P(D | B) P(B) = P(A | D) =

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

Cost of procedure is $1,000,000

Data regarding accuracy of the procedure is: Prob (+ test result | patient has diabetes) = .90 Prob (+ test result | patient has leukemia) = .95 Prob (+ test result | patient has neither) = .07

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

Prob (Patient has diabetes) = .02 Prob (Patient has leukemia) = .01 Prob (Patient has neither) = .97 We also know that in the general population:

(2)

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

What probabilities do we really need to know?

Prob (patient has diabetes | + test result) = ??? Prob (patient has leukemia | + test result) = ??? Prob (patient has neither | + test result) = ???

How can we find these probabilities?

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

Prob (patient has diabetes | + test result) =

P (+ test result | diabetes) P(diabetes) P (+ test result | diabetes) P(diabetes) + P (+ test result | leukemia) P(leukemia) + P (+ test result | neither) P(neither)

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

Prob (D | + ) = P (+| D) P(D) P (+ | D) P(D) + P (+ | L) P(L) + P (+ | N) P(N) (.90) (.02) (.90) (.02) + (.95) (.01) + (.07) (.97) = .19

(3)

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

Prob (L | + ) = P (+| L) P(L) P (+ | L) P(L) + P (+ | D) P(D) + P (+ | N) P(N) (.95) (.01) (.95) (.01) + (.90) (.02) + (.07) (.97) = .10

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

Prob (N | + ) = P (+| N) P(N) P (+ | N) P(N) + P (+ | L) P(L) + P (+ | D) P(D) (.07) (.97) (.07) (.97) + (.95) (.01) + (.90) (.02) = .71

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

To demonstrate that these probs. are correct, look at a random sample of 100,000 people

2000 1000 97,000 1800 950 6790 200 50 90,210 100,000 9,540 90,460 D L N 90% 95% 7%

(4)

Bayes’ Theorem-

Example

Prob (+ test result | patient has diabetes) = .90 Prob (+ test result | patient has leukemia) = .95 Prob (+ test result | patient has neither) = .07

Prob (Patient has diabetes) = .02 Prob (Patient has leukemia) = .01 Prob (Patient has neither) = .97 Remember that:

and

Bayes’ Theorem-

Example

May also want to be concerned about false negatives:

Prob (Patient has diabetes | - ) = 200/90460 Prob (Patient has leukemia | - ) = 50/90460

Bayes’ Theorem-

Example

Evaluation of Medical Screening Procedure

Cost of procedure is $1,000,000

Data regarding accuracy of the procedure is: Prob (+ test result | patient has diabetes) = .90 Prob (+ test result | patient has leukemia) = .95 Prob (+ test result | patient has neither) = .07

(5)

Bayes’

Theorem-Practice problem

Product Manager Problem

There are two types of probabilities: Actual: P(superior product)

Survey results: P(Survey says superior product)

Bayes’

Theorem-Practice problem

Product manager Problem - p. 21

Find P(superior product|survey says not superior) Part a) First survey is negative

Part b) Second survey is negative

Find P(superior product|survey says not superior) Using results from (a) as starting point in (b) – use condit. prob. as new marginals

Quick Review of Discrete and

Continuous Distributions

Discrete Probability Distribution

Continuous Probability Distribution Random Variable

Discrete Continuous

Binomial

Normal (and Normal Approximation to Binomial)

(6)

Random Variable

Variable that takes on a set of unique numerical values which represent every possible outcome of a random process

Discrete

Continuous

--Values are usually integers (finite number of values)

Values are real #s (infinite number of values within interval)

Probability Distribution

Discrete – Collection of probabilities that describe frequency with which random variable takes on each of its possible values

1. 0 <= P(x) <= 1 2. ΣP(xi) = 1

i

Called probability mass function

Cumulative distribution

function

Probability that x takes on values <= X F(x) = P( x <= X) =

Σ

P(xi)

xi<=X

1. 0 <= F(x) <= 1 2. F(a) <= F(b) if a < b

(7)

Discrete Prob. Distribution

example

There are 20 students in a class, where the ages are distributed as follows:

Age 18 19 20 21 24 Frequency 5 6 4 4 1

Discrete Prob. Distribution

example

There are 20 students in a class, where the ages are distributed as follows:

Age 18 19 20 21 24 Frequency 5 6 4 4 1 P(x) .25 .30 .20 .20 .05 20 1.0 F(x) .25 .55 .75 .95 1.00

Discrete Prob. Distribution

example

Find

1. P(x = 19) = .30 2. P(x <= 21) = .95 3. P(19 < x <= 22) = .40 4. The mean age of students

in the class

µ= Σ xiP(xi) = 19.6

(8)

Discrete Prob. Distribution

example

To find variance: σ2 = Σ (x i-µ) 2 P(xi) i = E (xi2 ) -µ2 Where E (xi2 ) = Σx i2P(xi) (Easier to compute) i

Discrete Prob. Distribution

example

σ2 = Σ (x i-µ) 2 P(xi) σ2 =.25(18-19.6 )2 + .3(19-19.6)2+.2(20-19.6)2 +.2(21-19.6)2+.05(24-19.6)2 = 2.14 = E (xi2 ) -µ2 = 386.3-384.16 = 2.14 E (xi2 ) = Σx i2P(xi) = 182(.25) + 192(.3) + 202(.2) + 212(.2) + 242(.05) σ2 1. 2.

Discrete Prob. Distribution

example

To find standard deviation: σ = σ2 = 2.14 = 1.46

µ= Σ xiP(xi) = 19.6 = E (xi2 ) -µ2 = 2.14

σ2

(9)

Binomial distribution

1) Only 2 possible outcomes, success or failure 2) There are n independent trials

3) Prob. of S or F remains constant

4) Random variable represents # of successes in n trials

Binomial distribution

r = # of successes n = # of trials p = probability of success P(x=r) = Cn(p)r (1-p)n-r Where Cn= n! r!(n-r)! r r µ= np σ2= np(1-p)

Binomial distribution

Quiz Problem example:

r = # of successes n = # of trials = 9

p = probability of success = 0.4

P(x=3) = C9(0.4)3 (1- 0.4)9-3

3

(10)

Quiz Problem example:

Binomial distribution

Use Table C from textbook - look under n=9 and prob. = 0.4 p=0.40 r 1 .9899 2 .9295 3 .7682 4 .5174 5 .2666 6 .0994 7 .0250 8 .0003 prob. of x=> 1 prob. of x=> 2 prob. of x=> 3 prob. of x=> 4 prob. of x=> 5 prob. of x=> 6 prob. of x=> 7 prob. of x=> 8

Binomial distribution

Quiz Problem example:

p=0.40 r 1 .9899 2 .9295 3 .7682 4 .5174 5 .2666 6 .0994 7 .0250 8 .0003 1. P(x=3) = P(x=>3) - P(x=>4) = .7682 - .5174 = .2508 2. P(x<5) = 1 - P(x=>5) = 1 -.2666 = .7334

Binomial distribution

Quiz Problem example:

p=0.40 r 1 .9899 2 .9295 3 .7682 4 .5174 5 .2666 6 .0994 7 .0250 8 .0003 3. P(3<x<8) = P(x=>4)-P(x=>8) = .5174 - .0003 = .5171 4. µ= np = 9(.4) = 3.6

5. Most likely = value with highest probability

(11)

Normal Distribution

(Continuous)

P(a <= x <= b) = F(b) - F(a) for b>a

Infinite number of values for x within an interval; values within a range

Normal Distribution: Z = x -σµ 0 1 2 3 4 -1 -2 -3 -4 N (µ, σ)

Normal Distribution

(Continuous)

Production process fills 46-oz. fruit juice cans Juice filling cans is N(46.5 oz., 0.2 oz.) a) State law requires that no more than 1 in 20 cans have less than 46 oz. Does this process meet the state law?

P(x<46) <= 1/20 = .05 ????

Normal Distribution

(Continuous) Normal Distribution: Z = x -σµ 0 1 2 3 4 -1 -2 -3 -4 = 46 - 46.5 .2 = - 2.5 46.5 Look up -2.5 in Normal Table Z = 1 - .9938 = .0062 < .05

(12)

Normal Distribution

(Continuous)

Production process fills 46-oz. fruit juice cans Juice filling cans is N(46.5 oz., 0.2 oz.)

b) P(46.3<=x<=46.6) = ??? c) P(x=>46.8) = ???

Normal Distribution

(Continuous)

Production process fills 46-oz. fruit juice cans Juice filling cans is N(46.5 oz., 0.2 oz.)

b) P(46.3<=x<=46.6) = ??? Z = x -σµ 46.3 - 46.5 .2 = -1.0 = Z = x -σµ 46.6 - 46.5 .2 = .5 =

Normal Distribution

(Continuous)

Production process fills 46-oz. fruit juice cans Juice filling cans is N(46.5 oz., 0.2 oz.)

b) P(46.3<=x<=46.6) = P(-1.0<=x<=.5) = .6915 - (1-.8413) = .5328 0 1 2 3 4 -1 -2 -3 -4

(13)

Normal Distribution

(Continuous)

Production process fills 46-oz. fruit juice cans Juice filling cans is N(46.5 oz., 0.2 oz.)

c) P(x=>46.8) = ??? Z = x -σµ 46.8 - 46.5

.2 = 1.5

=

P(x=>1.5) = 1 - .9332 = .0668

Normal Approximation to the

Binomial

This applies when you have a Binomial setting but for very large n values. Normal Distribution: 0 1 2 3 4 -1 -2 -3 -4 N (µ, σ) Binomial Distribution: B (n, p ) Normal Approximation: µ= np σ2= np(1-p) σ = np(1-p)

Normal Approximation to the

Binomial

Out of graduating Seniors, 80% have jobs by graduation. Take a sample of 200. a) What is the likelihood that at least 125

have jobs?

b) That between 170 and 185 have jobs? Binomial setting (S vs. F), but very large n

(14)

Normal Approximation to the

Binomial

n = 200 p = .80 µ= np = 200 (.8) = 160 σ2= np(1-p) = 200 (.8) (.2)= 32 σ= np(1-p) = 32 = 5.66 a) P(x=>125) = P(Z=> -6.27) = 1.0 Z = x -σµ 124.5 - 160 5.66 = - 6.27 =

Normal Approximation to the

Binomial

This applies when you have a Binomial setting but for very large n values. Normal Distribution: 0 1 2 3 4 -1 -2 -3 -4 N (µ, σ) Binomial Distribution: B (n, p ) Normal Approximation: µ= np σ2= np(1-p) σ = np(1-p)

Normal Approximation to the

Binomial

n = 200 p = .80 µ= np = 200 (.8) = 160 σ2= np(1-p) = 200 (.8) (.2)= 32 σ= np(1-p) = 32 = 5.66 a) P(x=>125) = P(Z=> -6.27) = 1.0 Z = x -σµ 124.5 - 160 5.66 = - 6.27 =

(15)

Normal Approximation to the

Binomial

n = 200 p = .80 µ= np = 200 (.8) = 160 σ2= np(1-p) = 200 (.8) (.2) =32 σ= np(1-p) = 32 = 5.66 b) P(170<=x<=185) = P(1.68<=Z<=4.5) Z = 169.5 - 1605.66 = 1.68 Z = 185.5 - 1605.66 = 4.5

Normal Approximation to the

Binomial

b) P(170<=x<=185) = P(1.68<=Z<=4.5) = 1.0 - .95352 = .04648 0 1 2 3 4 -1 -2 -3 -4

References

Related documents