SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Computer vision:
models, learning and inference
             Chapter 2
     Introduction to probability


     Please send errata to s.prince@cs.ucl.ac.uk
Random variables
• A random variable x denotes a quantity that is
  uncertain
• May be result of experiment (flipping a coin) or a real
  world measurements (measuring temperature)
• If observe several instances of x we get different
  values
• Some values occur more than others and this
  information is captured by a probability distribution


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   2
Discrete Random Variables




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   3
Continuous Random Variable




   Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   4
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
• This is captured in the joint probability distribution
• Written as Pr(x,y)
• Can read Pr(x,y) as “probability of x and y”



           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   5
Joint Probability




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   6
Marginalization
We can recover 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   7
Marginalization
We can recover 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 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 probability distribution of any variable in a joint distribution
  by integrating (or summing) over the other variables




Works in higher dimensions as well – leaves joint distribution between
whatever variables are left




               Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   10
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)




                                                                                       11
            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   12
Conditional Probability


• More usually written in compact form



• Can be re-arranged to give



        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   13
Conditional Probability


• This idea can be extended to more than two
  variables




        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   14
Bayes’ Rule
From before:


Combining:


Re-arranging:




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   15
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




Posterior – what we                                      Evidence –a constant to
know about y after                                       ensure that the left hand
seeing x                                                 side is a valid distribution
             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince      16
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   17
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   18
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   19
Expectation
Expectation tell 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   20
Expectation
Expectation tell us the expected or average value of some
function f [x] taking into account the distribution of x

Definition in two dimensions:




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   21
Expectation: Common Cases




  Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   22
Expectation: Rules



Rule 1:

Expected value of a constant is the constant




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   23
Expectation: Rules



Rule 2:

Expected value of constant times function is constant times
expected value of function




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   24
Expectation: Rules



Rule 3:

Expectation of sum of functions is sum of expectation of
functions




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   25
Expectation: Rules



Rule 4:

Expectation of product of functions in variables x and y
is product of expectations of functions if x and y are independent




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   26
Conclusions
• Rules of probability are compact and simple

• Concepts of marginalization, joint and conditional
  probability, Bayes rule and expectation underpin all of the
  models in this book

• One remaining concept – conditional expectation –
  discussed later




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   27

Weitere ähnliche Inhalte

Andere mochten auch

Application of machine learning in industrial applications
Application of machine learning in industrial applicationsApplication of machine learning in industrial applications
Application of machine learning in industrial applications
Anish Das
 

Andere mochten auch (18)

Probability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdfProbability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdf
 
Economics Statistics Worktext
Economics Statistics WorktextEconomics Statistics Worktext
Economics Statistics Worktext
 
Key Economic & Social Statistics - India
Key Economic & Social Statistics - IndiaKey Economic & Social Statistics - India
Key Economic & Social Statistics - India
 
Quantative analysis
Quantative analysisQuantative analysis
Quantative analysis
 
Analytical Design in Applied Marketing Research
Analytical Design in Applied Marketing ResearchAnalytical Design in Applied Marketing Research
Analytical Design in Applied Marketing Research
 
Hollywood Motion Picture Cluster
Hollywood Motion Picture ClusterHollywood Motion Picture Cluster
Hollywood Motion Picture Cluster
 
Noida Master Plan 2021
Noida Master Plan 2021Noida Master Plan 2021
Noida Master Plan 2021
 
Data Analysis
Data AnalysisData Analysis
Data Analysis
 
Application fields of R in classical industrial analytics
Application fields of R in classical industrial analyticsApplication fields of R in classical industrial analytics
Application fields of R in classical industrial analytics
 
Lean knowledge
Lean knowledgeLean knowledge
Lean knowledge
 
Ola fopl stats project
Ola fopl stats projectOla fopl stats project
Ola fopl stats project
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 
Multivariate data analysis regression, cluster and factor analysis on spss
Multivariate data analysis   regression, cluster and factor analysis on spssMultivariate data analysis   regression, cluster and factor analysis on spss
Multivariate data analysis regression, cluster and factor analysis on spss
 
Applied Statistics - Introduction
Applied Statistics - IntroductionApplied Statistics - Introduction
Applied Statistics - Introduction
 
WSC 2011, advanced tutorial on simulation in Statistics
WSC 2011, advanced tutorial on simulation in StatisticsWSC 2011, advanced tutorial on simulation in Statistics
WSC 2011, advanced tutorial on simulation in Statistics
 
Bhavishya- Technical Analysis
Bhavishya- Technical AnalysisBhavishya- Technical Analysis
Bhavishya- Technical Analysis
 
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
 
Application of machine learning in industrial applications
Application of machine learning in industrial applicationsApplication of machine learning in industrial applications
Application of machine learning in industrial applications
 

Ähnlich wie 02 cv mil_intro_to_probability

03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
zukun
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distribution
zukun
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
zukun
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regression
zukun
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_models
zukun
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classification
zukun
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
zukun
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformations
zukun
 
11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees
zukun
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
zukun
 
17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shape
zukun
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessing
zukun
 
16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameras
zukun
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_grids
zukun
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_words
zukun
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_models
zukun
 

Ähnlich wie 02 cv mil_intro_to_probability (20)

Introduction to Probability
Introduction to ProbabilityIntroduction to Probability
Introduction to Probability
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
 
Common Probability Distibution
Common Probability DistibutionCommon Probability Distibution
Common Probability Distibution
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distribution
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regression
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_models
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classification
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformations
 
11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
 
17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shape
 
13 cv mil_preprocessing
13 cv mil_preprocessing13 cv mil_preprocessing
13 cv mil_preprocessing
 
16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameras
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_grids
 
02 Introduction to probability ノート
02 Introduction to probability ノート02 Introduction to probability ノート
02 Introduction to probability ノート
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_words
 
Representation Learning & Generative Modeling with Variational Autoencoder(VA...
Representation Learning & Generative Modeling with Variational Autoencoder(VA...Representation Learning & Generative Modeling with Variational Autoencoder(VA...
Representation Learning & Generative Modeling with Variational Autoencoder(VA...
 
19 cv mil_temporal_models
19 cv mil_temporal_models19 cv mil_temporal_models
19 cv mil_temporal_models
 

Mehr von zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
zukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
zukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
zukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
zukun
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
zukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
zukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
zukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
zukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
zukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
zukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
zukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
zukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
zukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
zukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
zukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
zukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
zukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
zukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
zukun
 

Mehr von zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

02 cv mil_intro_to_probability

  • 1. Computer vision: models, learning and inference Chapter 2 Introduction to probability Please send errata to s.prince@cs.ucl.ac.uk
  • 2. Random variables • A random variable x denotes a quantity that is uncertain • May be result of experiment (flipping a coin) or a real world measurements (measuring temperature) • If observe several instances of x we get different values • Some values occur more than others and this information is captured by a probability distribution Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 2
  • 3. Discrete Random Variables Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3
  • 4. Continuous Random Variable Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4
  • 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 • This is captured in the joint probability distribution • Written as Pr(x,y) • Can read Pr(x,y) as “probability of x and y” Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5
  • 6. Joint Probability Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6
  • 7. Marginalization We can recover 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 7
  • 8. Marginalization We can recover 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
  • 9. Marginalization We can recover 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
  • 10. Marginalization We can recover probability distribution of any variable in a joint distribution by integrating (or summing) over the other variables Works in higher dimensions as well – leaves joint distribution between whatever variables are left Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10
  • 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) 11 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
  • 12. 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 12
  • 13. Conditional Probability • More usually written in compact form • Can be re-arranged to give Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13
  • 14. Conditional Probability • This idea can be extended to more than two variables Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14
  • 15. Bayes’ Rule From before: Combining: Re-arranging: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15
  • 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 Posterior – what we Evidence –a constant to know about y after ensure that the left hand seeing x side is a valid distribution Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16
  • 17. 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 17
  • 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 18
  • 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 19
  • 20. Expectation Expectation tell 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 20
  • 21. Expectation Expectation tell us the expected or average value of some function f [x] taking into account the distribution of x Definition in two dimensions: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21
  • 22. Expectation: Common Cases Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22
  • 23. Expectation: Rules Rule 1: Expected value of a constant is the constant Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23
  • 24. Expectation: Rules Rule 2: Expected value of constant times function is constant times expected value of function Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24
  • 25. Expectation: Rules Rule 3: Expectation of sum of functions is sum of expectation of functions Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25
  • 26. Expectation: Rules Rule 4: Expectation of product of functions in variables x and y is product of expectations of functions if x and y are independent Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26
  • 27. Conclusions • Rules of probability are compact and simple • Concepts of marginalization, joint and conditional probability, Bayes rule and expectation underpin all of the models in this book • One remaining concept – conditional expectation – discussed later Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27