SlideShare a Scribd company logo
1 of 35
Download to read offline
BAYESIAN STATISTICAL
CONCEPTS
A gentle introduction
Alex Etz
@alxetz ßTwitter (no ‘e’ in alex)
alexanderetz.com ßBlog
November 5th 2015
Why do we do statistics?
•  Deal with uncertainty
•  Will it rain today? How much?
•  When will my train arrive?
•  Describe phenomena
•  It rained 4cm today
•  My arrived between at 1605
•  Make predictions
•  It will rain between 3-8 cm today
•  My train will arrive between 1600 and 1615
Prediction is key
•  Description is boring
•  Description:
•  On this IQ test, these women averaged 3 points higher than these men
•  Prediction is interesting
•  Prediction:
•  On this IQ test, the average woman will score above the average man
•  Quantitative (precise) prediction is gold
•  Quantitative prediction:
•  On this IQ test, women will score between 1-3 pts higher than men
Evidence is prediction
•  Not just prediction in isolation
•  Competing prediction
•  Statistical evidence is comparative
Candy bags
5 orange, 5 blue 10 blue
Candy bags
•  I propose a game
•  Draw a candy from one of the bags
•  You guess which one it came from
•  After each draw (up to 6) you can bet (if you want)
Candy bags
•  If orange
•  Bag A predicts orange with probability .5
•  Bag B predicts orange with probability 0
•  Given orange, there is evidence for A over B
•  How much?
•  Infinity
•  Why?
•  Outcome is impossible for bag B, yet happened
•  Therefore, it cannot be bag B
Candy bags
•  If blue
•  Bag A predicts blue with probability .5 (5 out of 10)
•  Bag B predicts blue with probability 1.0 (10 out of 10)
•  Cannot rule out either bag
•  Given blue, there is evidence for B over A
•  How much?
•  Ratio of their predictions
•  1.0 divided by .5 = 2 per draw
Evidence is prediction
•  There is evidence for A over B if:
•  Prob. of observations given by A exceeds that given by B
•  Strength of the evidence for A over B:
•  The ratio of the probabilities (very simple!)
•  This is true for all of Bayesian statistics
•  More complicated math, but same basic idea
•  This is not true of classical statistics
Candy bag and a deck of cards
•  Same game, 1 extra step
•  I draw one card from a deck
•  Red suit (Heart, Diamond) I draw from bag A
•  Black suit (Spade, Club) I draw from bag B
•  Based on the card, draw a candy from one of the bags
•  You guess which one it came from
•  After each draw (up to 6) you can bet
•  (if you want)
Candy bags and a deck of cards
•  If orange, it came from bag A 100%. Game ends
•  If blue
•  Both bags had 50% chance of being selected
•  Bag A predicts blue with probability .5 (5 out of 10)
•  Bag B predicts blue with probability 1.0 (10 out of 10)
•  Evidence for B over A
•  How much?
•  Ratio of their predictions
•  1.0 divided by .5 = 2 per blue draw
Candy bags and a deck of cards
•  Did I add any information by drawing a card?
•  Did it affect your bet at all?
•  If the prior information doesn’t affect your conclusion,
it adds no information to the evidence
•  “Non-informative”
Candy bags and a deck of cards
•  Same game, 1 extra step
•  I draw one card from a deck
•  King of hearts I draw from bag B
•  Any other card I draw from bag A
•  I draw a ball from one of the bags
•  You guess which one it came from
•  After each draw (up to 6) you can bet
Candy bags and a deck of cards
•  Did I add any information by drawing a card?
•  Did it affect your bet at all?
•  Observations (evidence) the same
•  But conclusions can differ
•  Evidence is separate from conclusions
• The 1 euro bet
•  If orange draw
•  Bet on bag A, you win 100%
•  We have ruled out bag B
•  If blue draw
•  Bet on bag A, chance you win is x%
•  Bet on bag B, chance you win is (1-x)%
Betting on the odds
Betting on the odds
•  Depends on:
•  Evidence from sample (candies drawn)
•  Other information (card drawn, etc.)
•  A study only provides the evidence contained in the
sample
•  You must provide the outside information
•  Is the hypothesis initially implausible?
•  Is this surprising? Expected?
Betting on the odds
•  If initially fair odds
•  (Draw red suit vs. black suit)
•  Same as adding no information
•  Conclusion based only on evidence
•  For 1 blue draw
•  Initial (prior) odds 1 to 1
•  Evidence 2 to 1 in favor of bag B
•  Final (posterior) odds 2 to 1 in favor of bag B
•  Probability of bag B = 67%
Betting on the odds
•  If initially fair odds
•  (Draw red suit vs. black suit)
•  Same as adding no information
•  Conclusion based only on evidence
•  For 6 blue draws
•  Initial (prior) odds 1 to 1
•  Evidence 64 to 1 in favor of bag B
•  Final (posterior) odds 64 to 1 in favor of bag B
•  Probability of bag B = 98%
Betting on the odds
•  If initially unfair odds
•  (Draw King of Hearts vs. any other card)
•  Adding relevant outside information
•  Conclusion based on evidence combined with outside information
•  For 1 blue draw
•  Initial (prior) odds 1 to 51 in favor of bag A
•  Evidence 2 to 1 in favor of bag B
•  Final (posterior) odds 1 to 26 in favor of bag A
•  Probability of bag B = 4%
Betting on the odds
•  If initially unfair odds
•  (Draw King of Hearts vs. any other card)
•  Adding relevant outside information
•  Conclusion based on evidence combined with outside information
•  For 6 blue draws
•  Initial (prior) odds 1 to 51 in favor of bag A
•  Evidence 64 to 1 in favor of bag B
•  Final (posterior) odds 1.3 to 1 in favor of bag B
•  Probability of bag B = 55%
Betting on the odds
•  The evidence was the same
•  2 to 1 in favor of B (1 blue draw)
•  64 to 1 in favor of B (6 blue draws)
•  Outside information changed conclusion
•  Fair initial odds
•  Initial prob. of bag B = 50%
•  Final prob. of bag B = 67% (98%)
•  Unfair initial odds
•  Initial prob. of bag B = 2%
•  Final prob. of bag B = 4% (55%)
Should you take the bet?
•  If I offer you a 1 euro bet:
•  Bet on the bag that has the highest probability
•  For other bets, decide based on final odds
Evidence is comparative
• What if I had many more candy bag options?
Graphing the evidence
•  What if I wanted to compare every possible option at
once?
•  Graph it!
Graphing the evidence (1 blue)
Graphing the evidence (1 blue)
Graphing the evidence (6 blue)
Graphing the evidence (6 blue)
Graphing the evidence
•  This is called a Likelihood function
•  Ranks probability of the observations for all possible
candy bag proportions
•  Evidence is the ratio of heights on the curve
•  A above B, evidence for A over B
Graphing the evidence
•  Where does prior information enter?
•  Prior rankings for each possibility
•  Just as it did before
•  But now as a prior distribution
Prior information
•  “Non-informative” prior information
•  All possibilities ranked equally
•  i.e. no value preferred over another
•  Weak prior information; vague knowledge
•  “The bag has some blue candy, but not all blue candy”
•  After Halloween, for example
•  Saw some blue candy given out, but also other candies
•  Strong prior information
•  “Proportion of women in the population is between 40% and 60%”
Non-informative
No preference for any values
Weakly-informative
Some blue candy, but not all
Strongly-informative
Only middle values have any weight
Information and context
•  Your prior information depends on context!
•  And depends on what you know!
•  Just like drawing cards in the game
•  Just harder to specify
•  Intuitive, personal
•  Conclusions must take context into account

More Related Content

Viewers also liked

Bayes theorem explained
Bayes theorem explainedBayes theorem explained
Bayes theorem explainedDaniel Ross
 
Bayesian statistics
Bayesian statisticsBayesian statistics
Bayesian statisticsSagar Kamble
 
Introduction to Bayesian Statistics
Introduction to Bayesian StatisticsIntroduction to Bayesian Statistics
Introduction to Bayesian StatisticsPhilipp Singer
 
Spanos lecture 7: An Introduction to Bayesian Inference
Spanos lecture 7: An Introduction to Bayesian Inference Spanos lecture 7: An Introduction to Bayesian Inference
Spanos lecture 7: An Introduction to Bayesian Inference jemille6
 
Measuring International Financial Supervisory Transparency
Measuring International Financial Supervisory TransparencyMeasuring International Financial Supervisory Transparency
Measuring International Financial Supervisory TransparencyChristopher Gandrud
 
No use reasoning with adolescents? A randomised controlled trial comparing pe...
No use reasoning with adolescents? A randomised controlled trial comparing pe...No use reasoning with adolescents? A randomised controlled trial comparing pe...
No use reasoning with adolescents? A randomised controlled trial comparing pe...Matti Heino
 
Crisis of confidence, p-hacking and the future of psychology
Crisis of confidence, p-hacking and the future of psychologyCrisis of confidence, p-hacking and the future of psychology
Crisis of confidence, p-hacking and the future of psychologyMatti Heino
 
Work in progress and the state of affairs
Work in progress and the state of affairsWork in progress and the state of affairs
Work in progress and the state of affairsMatti Heino
 
Behaviour change and intervention research
Behaviour change and intervention researchBehaviour change and intervention research
Behaviour change and intervention researchMatti Heino
 
Hyperparameter optimization with approximate gradient
Hyperparameter optimization with approximate gradientHyperparameter optimization with approximate gradient
Hyperparameter optimization with approximate gradientFabian Pedregosa
 
4 pillars of visualization & communication by Noah Iliinsky
4 pillars of visualization & communication by Noah Iliinsky4 pillars of visualization & communication by Noah Iliinsky
4 pillars of visualization & communication by Noah Iliinskyiliinsky
 
Chapter 3 maximum likelihood and bayesian estimation-fix
Chapter 3   maximum likelihood and bayesian estimation-fixChapter 3   maximum likelihood and bayesian estimation-fix
Chapter 3 maximum likelihood and bayesian estimation-fixjelli123
 
Severe Testing: The Key to Error Correction
Severe Testing: The Key to Error CorrectionSevere Testing: The Key to Error Correction
Severe Testing: The Key to Error Correctionjemille6
 
Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)jemille6
 
3 recursive bayesian estimation
3  recursive bayesian estimation3  recursive bayesian estimation
3 recursive bayesian estimationSolo Hermelin
 
Graduate Econometrics Course, part 4, 2017
Graduate Econometrics Course, part 4, 2017Graduate Econometrics Course, part 4, 2017
Graduate Econometrics Course, part 4, 2017Arthur Charpentier
 
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...PyData
 
Slides econometrics-2017-graduate-2
Slides econometrics-2017-graduate-2Slides econometrics-2017-graduate-2
Slides econometrics-2017-graduate-2Arthur Charpentier
 

Viewers also liked (20)

Bayes theorem explained
Bayes theorem explainedBayes theorem explained
Bayes theorem explained
 
Bayesian statistics
Bayesian statisticsBayesian statistics
Bayesian statistics
 
Introduction to Bayesian Statistics
Introduction to Bayesian StatisticsIntroduction to Bayesian Statistics
Introduction to Bayesian Statistics
 
Spanos lecture 7: An Introduction to Bayesian Inference
Spanos lecture 7: An Introduction to Bayesian Inference Spanos lecture 7: An Introduction to Bayesian Inference
Spanos lecture 7: An Introduction to Bayesian Inference
 
ma12012id536
ma12012id536ma12012id536
ma12012id536
 
Measuring International Financial Supervisory Transparency
Measuring International Financial Supervisory TransparencyMeasuring International Financial Supervisory Transparency
Measuring International Financial Supervisory Transparency
 
No use reasoning with adolescents? A randomised controlled trial comparing pe...
No use reasoning with adolescents? A randomised controlled trial comparing pe...No use reasoning with adolescents? A randomised controlled trial comparing pe...
No use reasoning with adolescents? A randomised controlled trial comparing pe...
 
Crisis of confidence, p-hacking and the future of psychology
Crisis of confidence, p-hacking and the future of psychologyCrisis of confidence, p-hacking and the future of psychology
Crisis of confidence, p-hacking and the future of psychology
 
Work in progress and the state of affairs
Work in progress and the state of affairsWork in progress and the state of affairs
Work in progress and the state of affairs
 
Behaviour change and intervention research
Behaviour change and intervention researchBehaviour change and intervention research
Behaviour change and intervention research
 
Hyperparameter optimization with approximate gradient
Hyperparameter optimization with approximate gradientHyperparameter optimization with approximate gradient
Hyperparameter optimization with approximate gradient
 
4 pillars of visualization & communication by Noah Iliinsky
4 pillars of visualization & communication by Noah Iliinsky4 pillars of visualization & communication by Noah Iliinsky
4 pillars of visualization & communication by Noah Iliinsky
 
Chapter 3 maximum likelihood and bayesian estimation-fix
Chapter 3   maximum likelihood and bayesian estimation-fixChapter 3   maximum likelihood and bayesian estimation-fix
Chapter 3 maximum likelihood and bayesian estimation-fix
 
Severe Testing: The Key to Error Correction
Severe Testing: The Key to Error CorrectionSevere Testing: The Key to Error Correction
Severe Testing: The Key to Error Correction
 
Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)
 
3 recursive bayesian estimation
3  recursive bayesian estimation3  recursive bayesian estimation
3 recursive bayesian estimation
 
Graduate Econometrics Course, part 4, 2017
Graduate Econometrics Course, part 4, 2017Graduate Econometrics Course, part 4, 2017
Graduate Econometrics Course, part 4, 2017
 
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
 
Slides econometrics-2017-graduate-2
Slides econometrics-2017-graduate-2Slides econometrics-2017-graduate-2
Slides econometrics-2017-graduate-2
 
Econometrics 2017-graduate-3
Econometrics 2017-graduate-3Econometrics 2017-graduate-3
Econometrics 2017-graduate-3
 

Recently uploaded

Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...marjmae69
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationNathan Young
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...NETWAYS
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSebastiano Panichella
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSebastiano Panichella
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)Basil Achie
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...NETWAYS
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxFamilyWorshipCenterD
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxmavinoikein
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸mathanramanathan2005
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptssuser319dad
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...NETWAYS
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Pooja Nehwal
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Salam Al-Karadaghi
 

Recently uploaded (20)

Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism Presentation
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation Track
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptx
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.ppt
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
 

Bayesian statistical concepts

  • 1. BAYESIAN STATISTICAL CONCEPTS A gentle introduction Alex Etz @alxetz ßTwitter (no ‘e’ in alex) alexanderetz.com ßBlog November 5th 2015
  • 2. Why do we do statistics? •  Deal with uncertainty •  Will it rain today? How much? •  When will my train arrive? •  Describe phenomena •  It rained 4cm today •  My arrived between at 1605 •  Make predictions •  It will rain between 3-8 cm today •  My train will arrive between 1600 and 1615
  • 3. Prediction is key •  Description is boring •  Description: •  On this IQ test, these women averaged 3 points higher than these men •  Prediction is interesting •  Prediction: •  On this IQ test, the average woman will score above the average man •  Quantitative (precise) prediction is gold •  Quantitative prediction: •  On this IQ test, women will score between 1-3 pts higher than men
  • 4. Evidence is prediction •  Not just prediction in isolation •  Competing prediction •  Statistical evidence is comparative
  • 5. Candy bags 5 orange, 5 blue 10 blue
  • 6. Candy bags •  I propose a game •  Draw a candy from one of the bags •  You guess which one it came from •  After each draw (up to 6) you can bet (if you want)
  • 7. Candy bags •  If orange •  Bag A predicts orange with probability .5 •  Bag B predicts orange with probability 0 •  Given orange, there is evidence for A over B •  How much? •  Infinity •  Why? •  Outcome is impossible for bag B, yet happened •  Therefore, it cannot be bag B
  • 8. Candy bags •  If blue •  Bag A predicts blue with probability .5 (5 out of 10) •  Bag B predicts blue with probability 1.0 (10 out of 10) •  Cannot rule out either bag •  Given blue, there is evidence for B over A •  How much? •  Ratio of their predictions •  1.0 divided by .5 = 2 per draw
  • 9. Evidence is prediction •  There is evidence for A over B if: •  Prob. of observations given by A exceeds that given by B •  Strength of the evidence for A over B: •  The ratio of the probabilities (very simple!) •  This is true for all of Bayesian statistics •  More complicated math, but same basic idea •  This is not true of classical statistics
  • 10. Candy bag and a deck of cards •  Same game, 1 extra step •  I draw one card from a deck •  Red suit (Heart, Diamond) I draw from bag A •  Black suit (Spade, Club) I draw from bag B •  Based on the card, draw a candy from one of the bags •  You guess which one it came from •  After each draw (up to 6) you can bet •  (if you want)
  • 11. Candy bags and a deck of cards •  If orange, it came from bag A 100%. Game ends •  If blue •  Both bags had 50% chance of being selected •  Bag A predicts blue with probability .5 (5 out of 10) •  Bag B predicts blue with probability 1.0 (10 out of 10) •  Evidence for B over A •  How much? •  Ratio of their predictions •  1.0 divided by .5 = 2 per blue draw
  • 12. Candy bags and a deck of cards •  Did I add any information by drawing a card? •  Did it affect your bet at all? •  If the prior information doesn’t affect your conclusion, it adds no information to the evidence •  “Non-informative”
  • 13. Candy bags and a deck of cards •  Same game, 1 extra step •  I draw one card from a deck •  King of hearts I draw from bag B •  Any other card I draw from bag A •  I draw a ball from one of the bags •  You guess which one it came from •  After each draw (up to 6) you can bet
  • 14. Candy bags and a deck of cards •  Did I add any information by drawing a card? •  Did it affect your bet at all? •  Observations (evidence) the same •  But conclusions can differ •  Evidence is separate from conclusions
  • 15. • The 1 euro bet •  If orange draw •  Bet on bag A, you win 100% •  We have ruled out bag B •  If blue draw •  Bet on bag A, chance you win is x% •  Bet on bag B, chance you win is (1-x)% Betting on the odds
  • 16. Betting on the odds •  Depends on: •  Evidence from sample (candies drawn) •  Other information (card drawn, etc.) •  A study only provides the evidence contained in the sample •  You must provide the outside information •  Is the hypothesis initially implausible? •  Is this surprising? Expected?
  • 17. Betting on the odds •  If initially fair odds •  (Draw red suit vs. black suit) •  Same as adding no information •  Conclusion based only on evidence •  For 1 blue draw •  Initial (prior) odds 1 to 1 •  Evidence 2 to 1 in favor of bag B •  Final (posterior) odds 2 to 1 in favor of bag B •  Probability of bag B = 67%
  • 18. Betting on the odds •  If initially fair odds •  (Draw red suit vs. black suit) •  Same as adding no information •  Conclusion based only on evidence •  For 6 blue draws •  Initial (prior) odds 1 to 1 •  Evidence 64 to 1 in favor of bag B •  Final (posterior) odds 64 to 1 in favor of bag B •  Probability of bag B = 98%
  • 19. Betting on the odds •  If initially unfair odds •  (Draw King of Hearts vs. any other card) •  Adding relevant outside information •  Conclusion based on evidence combined with outside information •  For 1 blue draw •  Initial (prior) odds 1 to 51 in favor of bag A •  Evidence 2 to 1 in favor of bag B •  Final (posterior) odds 1 to 26 in favor of bag A •  Probability of bag B = 4%
  • 20. Betting on the odds •  If initially unfair odds •  (Draw King of Hearts vs. any other card) •  Adding relevant outside information •  Conclusion based on evidence combined with outside information •  For 6 blue draws •  Initial (prior) odds 1 to 51 in favor of bag A •  Evidence 64 to 1 in favor of bag B •  Final (posterior) odds 1.3 to 1 in favor of bag B •  Probability of bag B = 55%
  • 21. Betting on the odds •  The evidence was the same •  2 to 1 in favor of B (1 blue draw) •  64 to 1 in favor of B (6 blue draws) •  Outside information changed conclusion •  Fair initial odds •  Initial prob. of bag B = 50% •  Final prob. of bag B = 67% (98%) •  Unfair initial odds •  Initial prob. of bag B = 2% •  Final prob. of bag B = 4% (55%)
  • 22. Should you take the bet? •  If I offer you a 1 euro bet: •  Bet on the bag that has the highest probability •  For other bets, decide based on final odds
  • 23. Evidence is comparative • What if I had many more candy bag options?
  • 24. Graphing the evidence •  What if I wanted to compare every possible option at once? •  Graph it!
  • 29. Graphing the evidence •  This is called a Likelihood function •  Ranks probability of the observations for all possible candy bag proportions •  Evidence is the ratio of heights on the curve •  A above B, evidence for A over B
  • 30. Graphing the evidence •  Where does prior information enter? •  Prior rankings for each possibility •  Just as it did before •  But now as a prior distribution
  • 31. Prior information •  “Non-informative” prior information •  All possibilities ranked equally •  i.e. no value preferred over another •  Weak prior information; vague knowledge •  “The bag has some blue candy, but not all blue candy” •  After Halloween, for example •  Saw some blue candy given out, but also other candies •  Strong prior information •  “Proportion of women in the population is between 40% and 60%”
  • 35. Information and context •  Your prior information depends on context! •  And depends on what you know! •  Just like drawing cards in the game •  Just harder to specify •  Intuitive, personal •  Conclusions must take context into account

Editor's Notes

  1. Draw white, white, black
  2. Like when I drew colors to pick the basket