13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin...
Transcript of 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin...
![Page 1: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/1.jpg)
Uncertainty
Chapter13
Chapter131
![Page 2: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/2.jpg)
Outline
♦Uncertainty
♦Probability
♦SyntaxandSemantics
♦Inference
♦IndependenceandBayes’Rule
Chapter132
![Page 3: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/3.jpg)
Uncertainty
LetactionAt=leaveforairporttminutesbeforeflightWillAtgetmethereontime?
Problems:1)partialobservability(roadstate,otherdrivers’plans,etc.)2)noisysensors(KCBStrafficreports)3)uncertaintyinactionoutcomes(flattire,etc.)4)immensecomplexityofmodellingandpredictingtraffic
Henceapurelylogicalapproacheither1)risksfalsehood:“A25willgetmethereontime”
or2)leadstoconclusionsthataretooweakfordecisionmaking:“A25willgetmethereontimeifthere’snoaccidentonthebridgeanditdoesn’trainandmytiresremainintactetcetc.”
(A1440mightreasonablybesaidtogetmethereontimebutI’dhavetostayovernightintheairport...)
Chapter133
![Page 4: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/4.jpg)
Methodsforhandlinguncertainty
Defaultornonmonotoniclogic:AssumemycardoesnothaveaflattireAssumeA25worksunlesscontradictedbyevidence
Issues:Whatassumptionsarereasonable?Howtohandlecontradiction?
Ruleswithfudgefactors:A257→0.3AtAirportOnTimeSprinkler7→0.99WetGrassWetGrass7→0.7Rain
Issues:Problemswithcombination,e.g.,SprinklercausesRain??
ProbabilityGiventheavailableevidence,
A25willgetmethereontimewithprobability0.04Mahaviracarya(9thC.),Cardamo(1565)theoryofgambling
(FuzzylogichandlesdegreeoftruthNOTuncertaintye.g.,WetGrassistruetodegree0.2)
Chapter134
![Page 5: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/5.jpg)
Probability
Probabilisticassertionssummarizeeffectsoflaziness:failuretoenumerateexceptions,qualifications,etc.ignorance:lackofrelevantfacts,initialconditions,etc.
SubjectiveorBayesianprobability:Probabilitiesrelatepropositionstoone’sownstateofknowledge
e.g.,P(A25|noreportedaccidents)=0.06
Thesearenotclaimsofa“probabilistictendency”inthecurrentsituation(butmightbelearnedfrompastexperienceofsimilarsituations)
Probabilitiesofpropositionschangewithnewevidence:e.g.,P(A25|noreportedaccidents,5a.m.)=0.15
(AnalogoustologicalentailmentstatusKB|=α,nottruth.)
Chapter135
![Page 6: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/6.jpg)
Makingdecisionsunderuncertainty
SupposeIbelievethefollowing:
P(A25getsmethereontime|...)=0.04
P(A90getsmethereontime|...)=0.70
P(A120getsmethereontime|...)=0.95
P(A1440getsmethereontime|...)=0.9999
Whichactiontochoose?
Dependsonmypreferencesformissingflightvs.airportcuisine,etc.
Utilitytheoryisusedtorepresentandinferpreferences
Decisiontheory=utilitytheory+probabilitytheory
Chapter136
![Page 7: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/7.jpg)
Probabilitybasics
BeginwithasetΩ—thesamplespacee.g.,6possiblerollsofadie.ω∈Ωisasamplepoint/possibleworld/atomicevent
AprobabilityspaceorprobabilitymodelisasamplespacewithanassignmentP(ω)foreveryω∈Ωs.t.
0≤P(ω)≤1ΣωP(ω)=1
e.g.,P(1)=P(2)=P(3)=P(4)=P(5)=P(6)=1/6.
AneventAisanysubsetofΩ
P(A)=Σω∈AP(ω)
E.g.,P(dieroll<4)=P(1)+P(2)+P(3)=1/6+1/6+1/6=1/2
Chapter137
![Page 8: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/8.jpg)
Randomvariables
Arandomvariableisafunctionfromsamplepointstosomerange,e.g.,therealsorBooleans
e.g.,Odd(1)=true.
Pinducesaprobabilitydistributionforanyr.v.X:
P(X=xi)=Σω:X(ω)=xiP(ω)
e.g.,P(Odd=true)=P(1)+P(3)+P(5)=1/6+1/6+1/6=1/2
Chapter138
![Page 9: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/9.jpg)
Propositions
Thinkofapropositionastheevent(setofsamplepoints)wherethepropositionistrue
GivenBooleanrandomvariablesAandB:eventa=setofsamplepointswhereA(ω)=trueevent¬a=setofsamplepointswhereA(ω)=falseeventa∧b=pointswhereA(ω)=trueandB(ω)=true
OfteninAIapplications,thesamplepointsaredefined
bythevaluesofasetofrandomvariables,i.e.,thesamplespaceistheCartesianproductoftherangesofthevariables
WithBooleanvariables,samplepoint=propositionallogicmodele.g.,A=true,B=false,ora∧¬b.
Proposition=disjunctionofatomiceventsinwhichitistruee.g.,(a∨b)≡(¬a∧b)∨(a∧¬b)∨(a∧b)⇒P(a∨b)=P(¬a∧b)+P(a∧¬b)+P(a∧b)
Chapter139
![Page 10: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/10.jpg)
Whyuseprobability?
Thedefinitionsimplythatcertainlogicallyrelatedeventsmusthaverelatedprobabilities
E.g.,P(a∨b)=P(a)+P(b)−P(a∧b)
> A B
True
AB
deFinetti(1931):anagentwhobetsaccordingtoprobabilitiesthatviolatetheseaxiomscanbeforcedtobetsoastolosemoneyregardlessofoutcome.
Chapter1310
![Page 11: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/11.jpg)
Syntaxforpropositions
PropositionalorBooleanrandomvariablese.g.,Cavity(doIhaveacavity?)Cavity=trueisaproposition,alsowrittencavity
Discreterandomvariables(finiteorinfinite)e.g.,Weatherisoneof〈sunny,rain,cloudy,snow〉Weather=rainisapropositionValuesmustbeexhaustiveandmutuallyexclusive
Continuousrandomvariables(boundedorunbounded)e.g.,Temp=21.6;alsoallow,e.g.,Temp<22.0.
ArbitraryBooleancombinationsofbasicpropositions
Chapter1311
![Page 12: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/12.jpg)
Priorprobability
Priororunconditionalprobabilitiesofpropositionse.g.,P(Cavity=true)=0.1andP(Weather=sunny)=0.72
correspondtobeliefpriortoarrivalofany(new)evidence
Probabilitydistributiongivesvaluesforallpossibleassignments:P(Weather)=〈0.72,0.1,0.08,0.1〉(normalized,i.e.,sumsto1)
Jointprobabilitydistributionforasetofr.v.sgivestheprobabilityofeveryatomiceventonthoser.v.s(i.e.,everysamplepoint)
P(Weather,Cavity)=a4×2matrixofvalues:
Weather=sunnyraincloudysnowCavity=true0.1440.020.0160.02Cavity=false0.5760.080.0640.08
Everyquestionaboutadomaincanbeansweredbythejoint
distributionbecauseeveryeventisasumofsamplepoints
Chapter1312
![Page 13: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/13.jpg)
Probabilityforcontinuousvariables
Expressdistributionasaparameterizedfunctionofvalue:P(X=x)=U[18,26](x)=uniformdensitybetween18and26
0.125
dx 1826
HerePisadensity;integratesto1.P(X=20.5)=0.125reallymeans
limdx→0
P(20.5≤X≤20.5+dx)/dx=0.125
Chapter1313
![Page 14: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/14.jpg)
Gaussiandensity
P(x)=1 √2πσe−(x−µ)2/2σ2
0
Chapter1314
![Page 15: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/15.jpg)
Conditionalprobability
Conditionalorposteriorprobabilitiese.g.,P(cavity|toothache)=0.8i.e.,giventhattoothacheisallIknow
NOT“iftoothachethen80%chanceofcavity”
(Notationforconditionaldistributions:P(Cavity|Toothache)=2-elementvectorof2-elementvectors)
Ifweknowmore,e.g.,cavityisalsogiven,thenwehaveP(cavity|toothache,cavity)=1
Note:thelessspecificbeliefremainsvalidaftermoreevidencearrives,butisnotalwaysuseful
Newevidencemaybeirrelevant,allowingsimplification,e.g.,P(cavity|toothache,49ersWin)=P(cavity|toothache)=0.8
Thiskindofinference,sanctionedbydomainknowledge,iscrucial
Chapter1315
![Page 16: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/16.jpg)
Conditionalprobability
Definitionofconditionalprobability:
P(a|b)=P(a∧b)
P(b)ifP(b)6=0
Productrulegivesanalternativeformulation:P(a∧b)=P(a|b)P(b)=P(b|a)P(a)
Ageneralversionholdsforwholedistributions,e.g.,P(Weather,Cavity)=P(Weather|Cavity)P(Cavity)
(Viewasa4×2setofequations,notmatrixmult.)
Chainruleisderivedbysuccessiveapplicationofproductrule:P(X1,...,Xn)=P(X1,...,Xn−1)P(Xn|X1,...,Xn−1)
=P(X1,...,Xn−2)P(Xn1|X1,...,Xn−2)P(Xn|X1,...,Xn−1)=...=Π
ni=1P(Xi|X1,...,Xi−1)
Chapter1316
![Page 17: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/17.jpg)
Inferencebyenumeration
Startwiththejointdistribution:
cavity
L
toothache
cavity
catchcatch
L
toothache
L
catchcatch
L
.108.012
.016.064
.072
.144
.008
.576
Foranypropositionφ,sumtheatomiceventswhereitistrue:P(φ)=Σω:ω|=φP(ω)
Chapter1317
![Page 18: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/18.jpg)
Inferencebyenumeration
Startwiththejointdistribution:
cavity
L
toothache
cavity
catchcatch
L
toothache
L
catchcatch
L
.108.012
.016.064
.072
.144
.008
.576
Foranypropositionφ,sumtheatomiceventswhereitistrue:P(φ)=Σω:ω|=φP(ω)
P(toothache)=0.108+0.012+0.016+0.064=0.2
Chapter1318
![Page 19: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/19.jpg)
Inferencebyenumeration
Startwiththejointdistribution:
cavity
L
toothache
cavity
catchcatch
L
toothache
L
catchcatch
L
.108.012
.016.064
.072
.144
.008
.576
Foranypropositionφ,sumtheatomiceventswhereitistrue:P(φ)=Σω:ω|=φP(ω)
P(cavity∨toothache)=0.108+0.012+0.072+0.008+0.016+0.064=0.28
Chapter1319
![Page 20: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/20.jpg)
Inferencebyenumeration
Startwiththejointdistribution:
cavity
L
toothache
cavity
catchcatch
L
toothache
L
catchcatch
L
.108.012
.016.064
.072
.144
.008
.576
Canalsocomputeconditionalprobabilities:
P(¬cavity|toothache)=P(¬cavity∧toothache)
P(toothache)
=0.016+0.064
0.108+0.012+0.016+0.064=0.4
Chapter1320
![Page 21: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/21.jpg)
Normalization
cavityL
toothache
cavity
catchcatch
L
toothache
L
catchcatch
L
.108.012
.016.064
.072
.144
.008
.576
Denominatorcanbeviewedasanormalizationconstantα
P(Cavity|toothache)=αP(Cavity,toothache)
=α[P(Cavity,toothache,catch)+P(Cavity,toothache,¬catch)]
=α[〈0.108,0.016〉+〈0.012,0.064〉]=α〈0.12,0.08〉=〈0.6,0.4〉
Generalidea:computedistributiononqueryvariablebyfixingevidencevariablesandsummingoverhiddenvariables
Chapter1321
![Page 22: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/22.jpg)
Inferencebyenumeration,contd.
LetXbeallthevariables.Typically,wewanttheposteriorjointdistributionofthequeryvariablesY
givenspecificvaluesefortheevidencevariablesE
LetthehiddenvariablesbeH=X−Y−E
Thentherequiredsummationofjointentriesisdonebysummingoutthehiddenvariables:
P(Y|E=e)=αP(Y,E=e)=αΣhP(Y,E=e,H=h)
ThetermsinthesummationarejointentriesbecauseY,E,andHtogetherexhaustthesetofrandomvariables
Obviousproblems:1)Worst-casetimecomplexityO(d
n)wheredisthelargestarity
2)SpacecomplexityO(dn)tostorethejointdistribution
3)HowtofindthenumbersforO(dn)entries???
Chapter1322
![Page 23: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/23.jpg)
Independence
AandBareindependentiffP(A|B)=P(A)orP(B|A)=P(B)orP(A,B)=P(A)P(B)
Weather
ToothacheCatch
Cavitydecomposes into
Weather
ToothacheCatchCavity
P(Toothache,Catch,Cavity,Weather)=P(Toothache,Catch,Cavity)P(Weather)
32entriesreducedto12;fornindependentbiasedcoins,2n→n
Absoluteindependencepowerfulbutrare
Dentistryisalargefieldwithhundredsofvariables,noneofwhichareindependent.Whattodo?
Chapter1323
![Page 24: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/24.jpg)
Conditionalindependence
P(Toothache,Cavity,Catch)has23−1=7independententries
IfIhaveacavity,theprobabilitythattheprobecatchesinitdoesn’tdependonwhetherIhaveatoothache:
(1)P(catch|toothache,cavity)=P(catch|cavity)
ThesameindependenceholdsifIhaven’tgotacavity:(2)P(catch|toothache,¬cavity)=P(catch|¬cavity)
CatchisconditionallyindependentofToothachegivenCavity:P(Catch|Toothache,Cavity)=P(Catch|Cavity)
Equivalentstatements:P(Toothache|Catch,Cavity)=P(Toothache|Cavity)P(Toothache,Catch|Cavity)=P(Toothache|Cavity)P(Catch|Cavity)
Chapter1324
![Page 25: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/25.jpg)
Conditionalindependencecontd.
Writeoutfulljointdistributionusingchainrule:P(Toothache,Catch,Cavity)=P(Toothache|Catch,Cavity)P(Catch,Cavity)=P(Toothache|Catch,Cavity)P(Catch|Cavity)P(Cavity)=P(Toothache|Cavity)P(Catch|Cavity)P(Cavity)
I.e.,2+2+1=5independentnumbers(equations1and2remove2)
Inmostcases,theuseofconditionalindependencereducesthesizeoftherepresentationofthejointdistributionfromexponentialinntolinearinn.
Conditionalindependenceisourmostbasicandrobust
formofknowledgeaboutuncertainenvironments.
Chapter1325
![Page 26: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/26.jpg)
Bayes’Rule
ProductruleP(a∧b)=P(a|b)P(b)=P(b|a)P(a)
⇒Bayes’ruleP(a|b)=P(b|a)P(a)
P(b)
orindistributionform
P(Y|X)=P(X|Y)P(Y)
P(X)=αP(X|Y)P(Y)
Usefulforassessingdiagnosticprobabilityfromcausalprobability:
P(Cause|Effect)=P(Effect|Cause)P(Cause)
P(Effect)
E.g.,letMbemeningitis,Sbestiffneck:
P(m|s)=P(s|m)P(m)
P(s)=
0.8×0.0001
0.1=0.0008
Note:posteriorprobabilityofmeningitisstillverysmall!
Chapter1326
![Page 27: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/27.jpg)
Bayes’Ruleandconditionalindependence
P(Cavity|toothache∧catch)
=αP(toothache∧catch|Cavity)P(Cavity)
=αP(toothache|Cavity)P(catch|Cavity)P(Cavity)
ThisisanexampleofanaiveBayesmodel:
P(Cause,Effect1,...,Effectn)=P(Cause)ΠiP(Effecti|Cause)
Toothache
Cavity
Catch
Cause
Effect1Effectn
Totalnumberofparametersislinearinn
Chapter1327
![Page 28: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/28.jpg)
WumpusWorld
OK 1,1 2,1 3,1 4,1
1,2 2,2 3,2 4,2
1,3 2,3 3,3 4,3
1,4 2,4
OK OK
3,4 4,4
B
B
Pij=trueiff[i,j]containsapit
Bij=trueiff[i,j]isbreezyIncludeonlyB1,1,B1,2,B2,1intheprobabilitymodel
Chapter1328
![Page 29: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/29.jpg)
Specifyingtheprobabilitymodel
ThefulljointdistributionisP(P1,1,...,P4,4,B1,1,B1,2,B2,1)
Applyproductrule:P(B1,1,B1,2,B2,1|P1,1,...,P4,4)P(P1,1,...,P4,4)
(DoitthiswaytogetP(Effect|Cause).)
Firstterm:1ifpitsareadjacenttobreezes,0otherwise
Secondterm:pitsareplacedrandomly,probability0.2persquare:
P(P1,1,...,P4,4)=Π4,4i,j=1,1P(Pi,j)=0.2
n×0.8
16−n
fornpits.
Chapter1329
![Page 30: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/30.jpg)
Observationsandquery
Weknowthefollowingfacts:b=¬b1,1∧b1,2∧b2,1
known=¬p1,1∧¬p1,2∧¬p2,1
QueryisP(P1,3|known,b)
DefineUnknown=PijsotherthanP1,3andKnown
Forinferencebyenumeration,wehave
P(P1,3|known,b)=αΣunknownP(P1,3,unknown,known,b)
Growsexponentiallywithnumberofsquares!
Chapter1330
![Page 31: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/31.jpg)
Usingconditionalindependence
Basicinsight:observationsareconditionallyindependentofotherhiddensquaresgivenneighbouringhiddensquares
1,1 2,1 3,1 4,1
1,2 2,2 3,2 4,2
1,3 2,3 3,3 4,3
1,4 2,4 3,4 4,4
KNOWNFRINGE
QUERYOTHER
DefineUnknown=Fringe∪OtherP(b|P1,3,Known,Unknown)=P(b|P1,3,Known,Fringe)
Manipulatequeryintoaformwherewecanusethis!
Chapter1331
![Page 32: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/32.jpg)
Usingconditionalindependencecontd.
P(P1,3|known,b)=α∑
unknownP(P1,3,unknown,known,b)
=α∑
unknownP(b|P1,3,known,unknown)P(P1,3,known,unknown)
=α∑
fringe
∑
otherP(b|known,P1,3,fringe,other)P(P1,3,known,fringe,other)
=α∑
fringe
∑
otherP(b|known,P1,3,fringe)P(P1,3,known,fringe,other)
=α∑
fringeP(b|known,P1,3,fringe)
∑
otherP(P1,3,known,fringe,other)
=α∑
fringeP(b|known,P1,3,fringe)
∑
otherP(P1,3)P(known)P(fringe)P(other)
=αP(known)P(P1,3)∑
fringeP(b|known,P1,3,fringe)P(fringe)
∑
otherP(other)
=α′P(P1,3)∑
fringeP(b|known,P1,3,fringe)P(fringe)
Chapter1332
![Page 33: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/33.jpg)
Usingconditionalindependencecontd.
OK
1,1 2,1 3,1
1,2 2,2
1,3
OK OK
B
B
OK
1,1 2,1 3,1
1,2 2,2
1,3
OK OK
B
B
OK
1,1 2,1 3,1
1,2 2,2
1,3
OK OK
B
B
0.2 x 0.2 = 0.040.2 x 0.8 = 0.160.8 x 0.2 = 0.16
OK
1,1 2,1 3,1
1,2 2,2
1,3
OK OK
B
B
OK
1,1 2,1 3,1
1,2 2,2
1,3
OK OK
B
B
0.2 x 0.2 = 0.040.2 x 0.8 = 0.16
P(P1,3|known,b)=α′〈0.2(0.04+0.16+0.16),0.8(0.04+0.16)〉≈〈0.31,0.69〉
P(P2,2|known,b)≈〈0.86,0.14〉
Chapter1333
![Page 34: 13 Chapteraima.eecs.berkeley.edu/2nd-ed/slides-pdf/chapter13.pdf · 13 12. Probabilit y for con tin uous v ariables Exp ress distribution as a pa rameterized function of value: P](https://reader033.fdocuments.us/reader033/viewer/2022042420/5f3798b0002ac46a283fd420/html5/thumbnails/34.jpg)
Summary
Probabilityisarigorousformalismforuncertainknowledge
Jointprobabilitydistributionspecifiesprobabilityofeveryatomicevent
Queriescanbeansweredbysummingoveratomicevents
Fornontrivialdomains,wemustfindawaytoreducethejointsize
Independenceandconditionalindependenceprovidethetools
Chapter1334