Bayesian Statistics the Fun Way

Book description

Probability and statistics are increasingly important in a huge range of professions. But many people use data in ways they don’t even understand, meaning they aren’t getting the most from it. Bayesian Statistics the Fun Way will change that.

This book will give you a complete understanding of Bayesian statistics through simple explanations and un-boring examples. Find out the probability of UFOs landing in your garden, how likely Han Solo is to survive a flight through an asteroid belt, how to win an argument about conspiracy theories, and whether a burglary really was a burglary, to name a few examples.

By using these off-the-beaten-track examples, the author actually makes learning statistics fun. And you’ll learn real skills, like how to:

•How to measure your own level of uncertainty in a conclusion or belief•Calculate Bayes theorem and understand what it’s useful for•Find the posterior, likelihood, and prior to check the accuracy of your conclusions•Calculate distributions to see the range of your data•Compare hypotheses and draw reliable conclusions from them

Next time you find yourself with a sheaf of survey results and no idea what to do with them, turn to Bayesian Statistics the Fun Way to get the most value from your data.

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. About the Technical Reviewer
  7. Brief Contents
  8. Contents in Detail
  9. Acknowledgments
  10. Introduction
    1. Why Learn Statistics?
    2. What Is “Bayesian” Statistics?
    3. What’s in This Book
    4. Background for Reading the Book
    5. Now Off on Your Adventure!
  11. Part I: Introduction to Probability
  12. 1. Bayesian Thinking and Everyday Reasoning
    1. Reasoning About Strange Experiences
    2. Gathering More Evidence and Updating Your Beliefs
    3. Comparing Hypotheses
    4. Data Informs Belief; Belief Should Not Inform Data
    5. Wrapping Up
    6. Exercises
  13. 2. Measuring Uncertainty
    1. What Is a Probability?
    2. Calculating Probabilities by Counting Outcomes of Events
    3. Calculating Probabilities as Ratios of Beliefs
    4. Wrapping Up
    5. Exercises
  14. 3. The Logic of Uncertainty
    1. Combining Probabilities with AND
    2. Combining Probabilities with OR
    3. Wrapping Up
    4. Exercises
  15. 4. Creating a Binomial Probability Distribution
    1. Structure of a Binomial Distribution
    2. Understanding and Abstracting Out the Details of Our Problem
    3. Counting Our Outcomes with the Binomial Coefficient
    4. Example: Gacha Games
    5. Wrapping Up
    6. Exercises
  16. 5. The Beta Distribution
    1. A Strange Scenario: Getting the Data
    2. The Beta Distribution
    3. Reverse-Engineering the Gacha Game
    4. Wrapping Up
    5. Exercises
  17. Part II: Bayesian Probability and Prior Probabilities
  18. 6. Conditional Probability
    1. Introducing Conditional Probability
    2. Conditional Probabilities in Reverse and Bayes’ Theorem
    3. Introducing Bayes’ Theorem
    4. Wrapping Up
    5. Exercises
  19. 7. Bayes’ Theorem with LEGO
    1. Working Out Conditional Probabilities Visually
    2. Working Through the Math
    3. Wrapping Up
    4. Exercises
  20. 8. The Prior, Likelihood, and Posterior of Bayes’ Theorem
    1. The Three Parts
    2. Investigating the Scene of a Crime
    3. Considering Alternative Hypotheses
    4. Comparing Our Unnormalized Posteriors
    5. Wrapping Up
    6. Exercises
  21. 9. Bayesian Priors and Working with Probability Distributions
    1. C-3PO’s Asteroid Field Doubts
    2. Determining C-3PO’s Beliefs
    3. Accounting for Han’s Badassery
    4. Creating Suspense with a Posterior
    5. Wrapping Up
    6. Exercises
  22. Part III: Parameter Estimation
  23. 10. Introduction to Averaging and Parameter Estimation
    1. Estimating Snowfall
    2. Means for Measurement vs. Means for Summary
    3. Wrapping Up
    4. Exercises
  24. 11. Measuring the Spread of Our Data
    1. Dropping Coins in a Well
    2. Finding the Mean Absolute Deviation
    3. Finding the Variance
    4. Finding the Standard Deviation
    5. Wrapping Up
    6. Exercises
  25. 12. The Normal Distribution
    1. Measuring Fuses for Dastardly Deeds
    2. The Normal Distribution
    3. Solving the Fuse Problem
    4. Some Tricks and Intuitions
    5. “N Sigma” Events
    6. The Beta Distribution and the Normal Distribution
    7. Wrapping Up
    8. Exercises
  26. 13. Tools of Parameter Estimation: The PDF, CDF, and Quantile Function
    1. Estimating the Conversion Rate for an Email Signup List
    2. The Probability Density Function
    3. Introducing the Cumulative Distribution Function
    4. The Quantile Function
    5. Wrapping Up
    6. Exercises
  27. 14. Parameter Estimation with Prior Probabilities
    1. Predicting Email Conversion Rates
    2. Taking in Wider Context with Priors
    3. Prior as a Means of Quantifying Experience
    4. Is There a Fair Prior to Use When We Know Nothing?
    5. Wrapping Up
    6. Exercises
  28. PART IV: Hypothesis Testing: The Heart of Statistics
  29. 15. From Parameter Estimation to Hypothesis Testing: Building a Bayesian A/B Test
    1. Setting Up a Bayesian A/B Test
    2. Monte Carlo Simulations
    3. Wrapping Up
    4. Exercises
  30. 16. Introduction to the Bayes Factor and Posterior Odds: The Competition of Ideas
    1. Revisiting Bayes’ Theorem
    2. Building a Hypothesis Test Using the Ratio of Posteriors
    3. Wrapping Up
    4. Exercises
  31. 17. Bayesian Reasoning in the Twilight Zone
    1. Bayesian Reasoning in the Twilight Zone
    2. Using the Bayes Factor to Understand the Mystic Seer
    3. Developing Our Own Psychic Powers
    4. Wrapping Up
    5. Exercises
  32. 18. When Data Doesn’t Convince You
    1. A Psychic Friend Rolling Dice
    2. Arguing with Relatives and Conspiracy Theorists
    3. Wrapping Up
    4. Exercises
  33. 19. From Hypothesis Testing to Parameter Estimation
    1. Is the Carnival Game Really Fair?
    2. Building a Probability Distribution
    3. From the Bayes Factor to Parameter Estimation
    4. Wrapping Up
    5. Exercises
  34. A. A Quick Introduction to R
    1. R and RStudio
    2. Creating an R Script
    3. Basic Concepts in R
    4. Functions
    5. Random Sampling
    6. Defining Your Own Functions
    7. Creating Basic Plots
    8. Exercise: Simulating a Stock Price
    9. Summary
  35. B. Enough Calculus to Get By
    1. Functions
    2. The Fundamental Theorem of Calculus
  36. C. Answers to the Exercises
  37. Index

Product information

  • Title: Bayesian Statistics the Fun Way
  • Author(s): Will Kurt
  • Release date: July 2019
  • Publisher(s): No Starch Press
  • ISBN: 9781593279561