02_Introduction_To_Probability
02_Introduction_To_Probability
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3
Discrete Random Variables
Photo by DaylandS
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4
Continuous Random Variable
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5
Joint Probability
• Consider two random variables x and y
• If we observe multiple paired instances, then some
combinations of outcomes are more likely than others
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6
Joint Probability
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 7
Marginalization
We can recover the probability distribution of any variable in a joint distribution
by integrating (or summing) over the other variables
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 8
Marginalization
We can recover the probability distribution of any variable in a joint distribution
by integrating (or summing) over the other variables
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 9
Marginalization
We can recover the probability distribution of any variable in a joint distribution
by integrating (or summing) over the other variables
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10
Marginalization
We can recover the probability distribution of any variable in a joint distribution
by integrating (or summing) over the other variables
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 11
Conditional Probability
• Conditional probability of x given that y=y1 is relative
propensity of variable x to take different outcomes given that
y is fixed to be equal to y1.
• Written as Pr(x|y=y1)
12
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Conditional Probability
• Conditional probability can be extracted from joint probability
• Extract appropriate slice and normalize
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13
Conditional Probability
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14
Conditional Probability
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15
Bayes’ Rule
From before:
Combining:
Re-arranging:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16
Bayes’ Rule Terminology
Likelihood – propensity for Prior – what we know
observing a certain value of about y before seeing x
x given a certain value of y
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 18
Independence
• If two variables x and y are independent then variable x tells
us nothing about variable y (and vice-versa)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 19
Independence
• When variables are independent, the joint factorizes into a
product of the marginals:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 20
Expectation
Expectation tells us the expected or average value of some
function f [x], taking into account the distribution of x
Definition:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21
Expectation
Expectation tells us the expected or average value of some
function f [x], taking into account the distribution of x
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22
Expectation: Common Cases
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23
Expectation: Rules
Rule 1:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24
Expectation: Rules
Rule 2:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25
Expectation: Rules
Rule 3:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26
Expectation: Rules
Rule 4:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27
Conclusions
• Rules of probability are compact and simple
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 28