BAYESβ FORMULA
a two-stage experiment Xingru Chen xingru.chen.gr@dartmouth.edu
XC 2020
BAYES FORMULA a two-stage experiment Xingru Chen - - PowerPoint PPT Presentation
BAYES FORMULA a two-stage experiment Xingru Chen xingru.chen.gr@dartmouth.edu XC 2020 Simplest Bayes Formula | = ! " !($|") . B B !($) Bayes probabilities Bayes theorem links the B B degree of
a two-stage experiment Xingru Chen xingru.chen.gr@dartmouth.edu
XC 2020
!($)
Bayesβ theorem links the degree
belief in a proposition be before and after accounting for ev eviden ence ce.
XC 2020
!($)
!($) .
!(") .
XC 2020
Even Event-1: 1: rain π rain = 0.6 Even Event-2: windy & cl clou
π windy & cloudy = 0.48 Pr Prior probab ability
The pr prior pr probabili lity of an event (often simply called th the pri rior) is its probability
from some prior information.
Evidence ce
The ev eviden ence ce term in Bayesβ theorem refers to the ov
probabili lity of this new piece
information.
XC 2020
Even Event-1: 1: rain Prior probability π rain = 0.6 Even Event-2: windy & cl clou
Evidence π windy & cloudy = 0.48
!(,*+-. & 0123-.)
XC 2020
Even Event-1: 1: rain Prior probability π rain = 0.6 Even Event-2: windy & cl clou
Evidence π windy & cloudy = 0.48 π rain|windy & cloudy =
! "#$% !('$%() & +,-.()|"#$%) !('$%() & +,-.())
.
windy & cl clou
| | rain π(windy & cloudyο½rain) = 0.64 Like kelihood
The like kelihood represents a conditional
is the degree to which the first event is consistent with the second event.
XC 2020
Even Event-1: 1: rain Prior probability π rain = 0.6 Even Event-2: windy & cl clou
Evidence π windy & cloudy = 0.48 π rain|windy & cloudy =
! "#$% !('$%() & +,-.()|"#$%) !('$%() & +,-.())
.
windy & cl clou
| | rain Likelihood π(windy & cloudyο½rain) = 0.64 rain | | windy & cl clou
Posterior probability π rain|windy & cloudy = β― rain | | windy & cl clou
Posterior probability π rain|windy & cloudy = 0.6Γ0.64 0.48 = 0.8
XC 2020
=>*-;+0;
Pr Prior probab ability ra rain
The pr prior pr probabili lity of an event (often simply called th the pri rior) is its probability
from some prior information.
Evidence ce windy & cl clou
The ev eviden ence ce term in Bayesβ theorem refers to the ov
probabili lity of this new piece
information.
Like kelihood
windy & cl clou
| | rain
The like kelihood represents a conditional
is the degree to which the first event is consistent with the second event.
Po Posterior probability rain | | windy & cl clou
The po post ster erior pr probabili lity represents the up updated pr prior pr probabili lity after taking into account some new piece
information.
XC 2020
XC 2020
Β§ A doctor is trying to decide if a patient has
three diseases π1, π2,
π3. Two tests are to be carried
each
which results in a positive (+)
a negative (β)
are four possible test patterns ++, +β, β+, and ββ. Β§ National records have indicated that, for 10,000 people having
these three diseases, the distribution
diseases and test results are as in Table below.
Di Disease Nu Number having th this disease Nu Number having th this disease + + + + + β β β + β β β π! 3215 2110 301 704 100 π" 2125 396 132 1187 410 π# 4660 510 3568 73 509 Total 10000 3016 4001 1964 1019
XC 2020
to compute various posterior probabilities
XC 2020
Po Posterior pr probabili lity: ππ | | + + π ππ|+ |+ + = πΈ + +|ππ πΈ(ππ) πΈ(+ +) Po Posterior pr probabili lity: ππ | | + β π ππ|+ |+ β = πΈ + β|ππ πΈ(ππ) πΈ(+ β) Po Posterior pr probabili lity: ππ | β β + π ππ|β + = πΈ β +|ππ πΈ(ππ) πΈ(β +) Po Posterior pr probabili lity: ππ | β β β π ππ|β β = πΈ β β|ππ πΈ(ππ) πΈ(β β)
XC 2020
Di Disease Nu Number having th this disease Nu Number having th this disease + + + + + β β β + β β β π! 3215 2110 301 704 100 π" 2125 396 132 1187 410 π# 4660 510 3568 73 509 Total 10000 3016 4001 1964 1019 Pr Prio ior probabil ilit ity: dis isease 1 π π! = 3215 10000 = 0.3215 Pr Prio ior probabil ilit ity: dis isease 2 π π" = 2125 10000 = 0.2125 Pr Prio ior probabil ilit ity: dis isease 3 π π# = 4660 10000 = 0.466
XC 2020
Di Disease Nu Number having th this disease Nu Number having th this disease + + + + + β β β + β β β π! 3215 2110 301 704 100 π" 2125 396 132 1187 410 π# 4660 510 3568 73 509 Total 10000 3016 4001 1964 1019 Ev Evide dence: + + π + + = 3016 10000 = 0.3016 Ev Evide dence: + β π + β = 4001 10000 = 0.4001 Ev Evide dence: β + π β + = 1964 10000 = 0.1964 Ev Evide dence β β π β β = 1019 10000 = 0.1019
XC 2020
Di Disease Nu Number having th this disease Nu Number having th this disease + + + + + β β β + β β β π! 3215 2110 301 704 100 π" 2125 396 132 1187 410 π# 4660 510 3568 73 509 Total 10000 3016 4001 1964 1019 Like kelihood: d: + + | ππ π + +|π! = 2110 3215 Like kelihood: d: + β | ππ π + β|π! = 301 3215 Like kelihood: d: β + | ππ π β + = 704 3215 Like kelihood: d: β β | ππ π β β = 100 3215
XC 2020
Di Disease Nu Number having th this disease Nu Number having th this disease + + + + + β β β + β β β π! 3215 2110 301 704 100 π" 2125 396 132 1187 410 π# 4660 510 3568 73 509 Total 10000 3016 4001 1964 1019 Like kelihood: d: + + | ππ π + +|π! = 2110 3215 Pr Prio ior probabil ilit ity: dis isease 1 π π! = 3215 10000 = 0.3215 Ev Evide dence: + + π + + = 3016 10000 = 0.3016 Po Posterior pr probabili lity: ππ | | + + π ππ|+ |+ + = πΈ + +|ππ πΈ(ππ) πΈ(+ +) = 2110 3215 3215 10000 3016 10000 = 2110 3016 = π. πππ
XC 2020
0.700 0.131 0.169
0.075 0.033 0.892
0.358 0.604 0.038
0.098 0.403 0.499 Po Posterior pr probabili lity: ππ | | + + π ππ|+ |+ + = πΈ + +|ππ πΈ(ππ) πΈ(+ +) Po Posterior pr probabili lity: ππ | | + β π ππ|+ |+ β = πΈ + β|ππ πΈ(ππ) πΈ(+ β) Po Posterior pr probabili lity: ππ | β β + π ππ|β + = πΈ β +|ππ πΈ(ππ) πΈ(β +) Po Posterior pr probabili lity: ππ | β β β π ππ|β β = πΈ β β|ππ πΈ(ππ) πΈ(β β)
XC 2020
Sometimes the evidence is not directly given to usβ¦
XC 2020
Β§ Ba Bayes es p probabil ilit ities ies: given the
the second stage
a two-stage experiment, the probability for an
at the first stage. Β§ Suppose we have a set
hypotheses πΌ1, πΌ2, β― , πΌ5, which are pairwise disjoint and such that Ξ© = πΌ1 βͺ πΌ2 βͺ β― βͺ πΌ5. We have a set
prior probabilities π πΌ1 , π πΌ2 , β― , π(πΌ5) for the hypotheses.
πΌ! πΌ" πΌ# πΌ% πΌ&
XC 2020
Β§ Ba Bayes es p probabil ilit ities ies: given the
the second stage
a two-stage experiment, the probability for an
at the first stage. Β§ Suppose we have a set
hypotheses πΌ1, πΌ2, β― , πΌ5, which are pairwise disjoint and such that Ξ© = πΌ1 βͺ πΌ2 βͺ β― βͺ πΌ5. We have a set
prior probabilities π πΌ1 , π πΌ2 , β― , π(πΌ5) for the hypotheses. Β§ We also have an event evidence ce πΉ, which can tell us further information about which hypothesis is
we know π(πΉ|πΌ6) for all π: if we know the correct hypothesis, we know the probability for the evidence πΉ. The conditional probability π(πΌ6|πΉ) is the probability for the hypothesis given the evidence πΉ, and is called the po posteri rior pr probabili lity.
XC 2020
Ba Bayesβ esβ f formula
πΌ!, β¦ , πΌ' are pairwise disjoint subsets
Ξ© (i.e., no two
the πΌ( have an element in common), then π πΌ! βͺ β― βͺ πΌ' = β()!
'
π(πΌ().
πΌ!, β¦ , πΌ' are pairwise disjoint subsets with Ξ© = πΌ! βͺ β― βͺ πΌ', and let πΉ be any
π πΉ = β()!
'
π(πΉ β© πΌ().
!(^!) .
XC 2020
Ba Bayesβ esβ f formula
a π(πΉ β© πΌU).
π πΉ β© πΌ6 = π πΉ πΌ6 π(πΌ6).
a π πΉ πΌU π(πΌU).
Ba Bayesβ esβ f formula
a π πΉ πΌU π(πΌU)
XC 2020
Β§ Four months later... xue hua piao piao Β§ You are about to get
the Dartmouth Coach and back to school. You want to know if you should wear a pair
snow boots. Β§ You ask both the driver and me independently if it is snowing in
us have a
# % chance
telling you the truth and a
! % chance
messing with you by
us tell you that "YES" it is snowing. Β§ Here in Hanover, the probability that it snows
any given day in November is
! ". What
is the probability that it is actually snowing?
XC 2020
=>*-;+0;
Pr Prior probab ability
The pr prior pr probabili lity of an event (often simply called th the pri rior) is its probability
from some prior information.
Evidence ce
The ev eviden ence ce term in Bayesβ theorem refers to the ov
probabili lity of this new piece
information.
Like kelihood
The like kelihood represents a conditional
is the degree to which the first event is consistent with the second event.
Po Posterior probability
The po post ster erior pr probabili lity represents the up updated pr prior pr probabili lity after taking into account some new piece
information.
XC 2020
Even Event-1: 1: sno now Prior probability π snow = 1 2 Even Event-2: 2: yes & yes Evidence π yes & yes = β― Ye Yes, Ye Yes | snow Likelihood π(yes & yes|snow) = β― sn snow | | y yes, es, y yes es Posterior probability π snow|yes & yes = β―
! b+2, !(.;b & .;b|b+2,) ! .;b & .;b
Ba Bayesβ esβ f formula π πΌ6 πΉ = π πΌ6 π(πΉ|πΌ6) β671
5 π πΉ πΌ6 π(πΌ6)
πΌ6: snow, not snow πΉ: yes & yes
XC 2020
! b+2, !(.;b & .;b|b+2,) ! .;b & .;b
Ba Bayesβ esβ f formula π πΌ6 πΉ = π πΌ6 π(πΉ|πΌ6) β671
5 π πΉ πΌ6 π(πΌ6)
πΌ6: snow, not snow πΉ: yes & yes π yes & yes = π snow π(yes & yes snow + π not snow π(yes & yes not snow = 1 2 (3 4)2+ 1 2 (1 4)2
XC 2020
π yes & yes = π snow π(yes & yes snow + π not snow π(yes & yes not snow = 1 2 (3 4)2+ 1 2 (1 4)2 π snow|yes & yes = π snow π(yes & yes|snow) π yes & yes = 1 2 (3 4)2 1 2 (3 4)2+ 1 2 (1 4)2 = 9 10
XC 2020
Β§ Forrest Gump has a box
assorted
includes 10 pieces
different flavors. Β§ A piece
chocolate is taken
at
π be the chosen piece. Β§ If Jenny does not buy him a new box
chocolate and the second piece
chocolate π is chosen from the
box at random. Β§ Consider the distributions
π and π. Are the two distributions the same?
XC 2020
Random variable π π π¦ = 1 10 Random variable π π π = 1 = π π = 1 π = 1 π π = 1 + π π = 1 π β 1 π π β 1 = 0Γ 1 10 + 1 9 Γ 9 10 = 1 10 Chocolate: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
XC 2020
Open book Scope: Chapters 1, 2, 3, and 4 Β§ discrete probability distributions Β§ continuous probability densities Β§ permutations and combinations Β§ conditional probability Materials: Slides, homework, quizzes, textbook Date & Time: July 20, 3 hours, 24 hours Office hours: July 20, July 21
Mid Midter erm 1
28 28 29 29 30 30 01 01 02 02 03 03 04 04 05 05 06 06 07 07 08 08 09 09 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 01 01 31 31 30 30
Sun Mon Tue Wed Thu Fri Sat
XC 2020