4
1 STAT 400 UIUC 1.5 – Bayes’ Theorem Stepanov Dalpiaz Nguyen Review: Law of Total Probability. P( A ) = P( A Ç B ) + P( A Ç B' ) Example 1: In Neverland, men constitute 60% of the labor force. The rates of unemployment are 6.0% and 4.5% among males and females, respectively. A person is selected at random from Neverland’s labor force. a) What is the probability that the person selected is a male and is unemployed? b) What is the probability that the person selected is a female and is unemployed? Unemployed Employed Total Male Female Total . ICM) - 0.6 I( UIM ) - - 0.06 ICUIF) - 0.045 ICM nu ) - ICM ) - ICUIM) - 0.6 ( 0.067=10.0367 - * ICU ) ICF nu ) -_ ICF ) .I( Ulf ) = 0.410.0457=10.0187 - =/ - ICM) = I -0.6=0.4 ICMNU ) 0.036 0.564 0.6 ICM ) 0.018 0.382 0.4 ICF ) [ 0.054 0.946 A ICFNU ) ICUIM ) - 0.06 I( MAU) - - 0.036 ICM) - 0.6 Ice , µ , I( MAE ) - 0.564 I = 0.94 # ( s ) ICUIF ) - 9045 I( FAN ) - - 0.018 ICF) - 0.4 ( Egp , I( FAE ) - 0.382=0.955

0.382=0 - GitHub Pages...In Neverland, men constitute 60% of the labor force. The rates of unemployment are 6.0% and 4.5% among males and females, respectively. A person is selected

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 0.382=0 - GitHub Pages...In Neverland, men constitute 60% of the labor force. The rates of unemployment are 6.0% and 4.5% among males and females, respectively. A person is selected

1

STAT 400 UIUC 1.5 – Bayes’ Theorem Stepanov

Dalpiaz Nguyen

Review: Law of Total Probability. P( A ) = P( A Ç B ) + P( A Ç B' ) Example 1: In Neverland, men constitute 60% of the labor force. The rates of unemployment are 6.0% and 4.5% among males and females, respectively. A person is selected at random from Neverland’s labor force. a) What is the probability that the person selected is a male and is unemployed? b) What is the probability that the person selected is a female and is unemployed? Unemployed Employed Total Male Female Total .

ICM) - 0.6 I( UIM) -- 0.06 ICUIF) - 0.045

ICM nu) - ICM) - ICUIM) - 0.6 ( 0.067=10.0367-

* ICU)

ICF nu) -_ ICF) .I( Ulf) = 0.410.0457=10.0187-

=/ - ICM) = I -0.6=0.4

ICMNU)→0.036 0.564 0.6 ← ICM)0.018 0.382 0.4 ← ICF)

[ 0.054 0.946 A

ICFNU) ICUIM)- 0.06 I(MAU) -- 0.036

ICM) - 0.6Ice ,µ, I(MAE)

-

- 0.564

I = 0.94

# (s)ICUIF) - 9045 I( FAN) -- 0.018

ICF) - 0.4 ( Egp,I( FAE) -0.382=0.955

Page 2: 0.382=0 - GitHub Pages...In Neverland, men constitute 60% of the labor force. The rates of unemployment are 6.0% and 4.5% among males and females, respectively. A person is selected

2

c) What is the probability that the person selected is unemployed? Law of Total Probability.

P( A ) = P( A Ç B ) + P( A Ç B' ) = P( B ) × P( A ½ B ) + P( B' ) × P( A ½ B' ) In general,

P( A ) = P( B i ) × P( A ½ B i )

d) Suppose the person selected is unemployed. What is the probability that a male was selected? Bayes' Theorem. P( B ) × P( A ½ B ) P( B ½ A ) = ¾¾¾ ¾¾ ¾ ¾ ¾¾ ¾ ¾ ¾¾ ¾ ¾ ¾ ¾ , P( B ) × P( A ½ B ) + P( B' ) × P( A ½ B' ) In general, P( B k ) × P( A ½ B k ) P( B k ½ A ) = ¾¾¾ ¾¾¾ ¾ ¾ ¾ ¾ ¾ , k = 1, … , m.

P( B i ) × P( A ½ B i )

å=

m

i 1

å=

m

i 1

I ( U) = 0.036 t 0.018=10.0547OR M

'

ICU) = I ( un M ) t ICU n F)= I ( M) . I ( UIM) t ICF) . I ( UIF)= 0.6 ( 0.06 ) t 0.4 ( 0.045) = 10.054J

m=3 I (A) = ICAN B.) t ICAN Ba ) t ICA RBs)= ICB ,) - ICAIB , ) t IC Ba) . ICAI Ba)

+ ICBs) - ICAI Bs)= ÷2I( Bi) . ICAI Bi)

' cnn.H.TT#=::Ti-⑤OR

ICM) . I (UIM)- =0.6×0.067-12(NIV) =-

0.6 (0.067+0.410.045)* cm) - peut M) + I (F) " IN ' F )

=§y

-

=ICBKAA)

* tea

Page 3: 0.382=0 - GitHub Pages...In Neverland, men constitute 60% of the labor force. The rates of unemployment are 6.0% and 4.5% among males and females, respectively. A person is selected

3

Example 2: In a presidential race in Neverland, the incumbent Democrat ( D ) is running against a field of four Republicans ( R 1, R 2, R 3, R 4 ) seeking the nomination. Political pundits estimate that the probabilities of R 1, R 2, R 3, and R 4 winning the nomination are 0.40, 0.30, 0.20, and 0.10, respectively. Furthermore, results from a variety of polls are suggesting that D would have a 55% chance of defeating R 1 in the general election, a 70% chance of defeating R 2, a 60% chance of defeating R 3, and an 80% chance of defeating R 4. Assuming all these estimates to be accurate, what are the chances that D will be a two-term president? Example 3: In Anytown, 10% of the people leave their keys in the ignition of their cars. Anytown’s police records indicate that 4.2% of the cars with keys left in the ignition are stolen. On the other hand, only 0.2% of the cars without keys left in the ignition are stolen. Suppose a car in Anytown is stolen. What is the probability that the keys were left in the ignition?

I ( RD = 0.4 I ( Rz ) = 0.3 I ( Rs) -- 0.2 I ( Ry) = 0.1

I ( w IR ,)= 0.55 I ( w/ Rz) = 0.7 I (w/ Rs)-

- 0.6 ICWI Ry) -- 0.8

ICW) -- III ( Ri) - ICWI Ri)= ICR, ) . If WIR ,

)t I ( Re) - ICW Ira) t IC Rs ) - ICW IRS)+ E ( Ry) . ICW / Ry)

= 10.63J

I ( keys) = 0.1 I ( stolen I No keys ) = 0.002 .

I (stolen / keys ) = 0.042I ( keys) - I (stolen / keys)IC keys I stolen) =--

ji IC keys) - I ( stolen ) Keys) tI( No keys) (stolen ) NokeyiOil (0.042)

=- 40.7J0.1 (0.042) t 0.9 ( 0.002)

Page 4: 0.382=0 - GitHub Pages...In Neverland, men constitute 60% of the labor force. The rates of unemployment are 6.0% and 4.5% among males and females, respectively. A person is selected

4

Example 4: In a certain population, the proportion of individuals who have a particular disease is 0.025. A test for the disease is positive in 94% of the people who have the disease and in 4% of the people who do not. a) Find the probability of receiving a positive reaction from this test. b) If a person received a positive reaction from this test, what is the probability that he/she has the disease? c) If a person received a negative reaction from this test, what is the probability that he/she doesn’t have the disease?

I (D) = 0.025 I ( t I D) = 0.94 I ( tf D ' ) = 0.04

Ict) = ICD) - Ict ID) t ICD' ) - Ict ID ')

= 0.025 ( 0.94) t ¥97540.04) = 0.0625mgOR

Disease No Disease

'nose;h÷/aoI- ⇒ eat40.06252

0.025 0.975 I

ICD / t) =

If Dn t)=

0.0235

ICI Ess 40.3767

OR by Bayes'

Theorem :

E ( pl t) =I(D)-I(tl# = 10.3767ICDI . If tf D) t I ( D ' ) -Ift ID ') -

ICD't -7=14727-9%1*40.99842OR by Bayes ' Theorem :

E ( D't -) =I(D'tI(-* (D') - El - ID' ) t ICD) .ec- 105=10.998-47