Think Bayes: Bayesian Statistics in Python

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

If you know how to program with Python and also know a little about probability, you’re ready to tackle Bayesian statistics. With this book, you'll learn how to solve statistical problems with Python code instead of mathematical notation, and use discrete probability distributions instead of continuous mathematics. Once you get the math out of the way, the Bayesian fundamentals will become clearer, and you’ll begin to apply these techniques to real-world problems. Bayesian statistical methods are becoming more common and more important, but not many resources are available to help beginners. Based on undergraduate classes taught by author Allen Downey, this book’s computational approach helps you get a solid start. Use your existing programming skills to learn and understand Bayesian statistics Work with problems involving estimation, prediction, decision analysis, evidence, and hypothesis testing Get started with simple examples, using coins, M&Ms, Dungeons & Dragons dice, paintball, and hockey Learn computational methods for solving real-world problems, such as interpreting SAT scores, simulating kidney tumors, and modeling the human microbiome.

Author(s): Allen B. Downey
Publisher: O'Reilly Media
Year: 2013

Language: English
Pages: 214
Tags: mathematics

Copyright
Table of Contents
Preface
My theory, which is mine
Modeling and approximation
Working with the code
Code style
Prerequisites
Conventions Used in This Book
Safari® Books Online
How to Contact Us
Contributor List
Chapter 1. Bayes’s Theorem
Conditional probability
Conjoint probability
The cookie problem
Bayes’s theorem
The diachronic interpretation
The M&M problem
The Monty Hall problem
Discussion
Chapter 2. Computational Statistics
Distributions
The cookie problem
The Bayesian framework
The Monty Hall problem
Encapsulating the framework
The M&M problem
Discussion
Exercises
Chapter 3. Estimation
The dice problem
The locomotive problem
What about that prior?
An alternative prior
Credible intervals
Cumulative distribution functions
The German tank problem
Discussion
Exercises
Chapter 4. More Estimation
The Euro problem
Summarizing the posterior
Swamping the priors
Optimization
The beta distribution
Discussion
Exercises
Chapter 5. Odds and Addends
Odds
The odds form of Bayes’s theorem
Oliver’s blood
Addends
Maxima
Mixtures
Discussion
Chapter 6. Decision Analysis
The Price is Right problem
The prior
Probability density functions
Representing PDFs
Modeling the contestants
Likelihood
Update
Optimal bidding
Discussion
Chapter 7. Prediction
The Boston Bruins problem
Poisson processes
The posteriors
The distribution of goals
The probability of winning
Sudden death
Discussion
Exercises
Chapter 8. Observer Bias
The Red Line problem
The model
Wait times
Predicting wait times
Estimating the arrival rate
Incorporating uncertainty
Decision analysis
Discussion
Exercises
Chapter 9. Two Dimensions
Paintball
The suite
Trigonometry
Likelihood
Joint distributions
Conditional distributions
Credible intervals
Discussion
Exercises
Chapter 10. Approximate Bayesian Computation
The Variability Hypothesis
Mean and standard deviation
Update
The posterior distribution of CV
Underflow
Log-likelihood
A little optimization
ABC
Robust estimation
Who is more variable?
Discussion
Exercises
Chapter 11. Hypothesis Testing
Back to the Euro problem
Making a fair comparison
The triangle prior
Discussion
Exercises
Chapter 12. Evidence
Interpreting SAT scores
The scale
The prior
Posterior
A better model
Calibration
Posterior distribution of efficacy
Predictive distribution
Discussion
Chapter 13. Simulation
The Kidney Tumor problem
A simple model
A more general model
Implementation
Caching the joint distribution
Conditional distributions
Serial Correlation
Discussion
Chapter 14. A Hierarchical Model
The Geiger counter problem
Start simple
Make it hierarchical
A little optimization
Extracting the posteriors
Discussion
Exercises
Chapter 15. Dealing with Dimensions
Belly button bacteria
Lions and tigers and bears
The hierarchical version
Random sampling
Optimization
Collapsing the hierarchy
One more problem
We’re not done yet
The belly button data
Predictive distributions
Joint posterior
Coverage
Discussion
Index
About the Author