1 Bayesian Thinking and Everyday Reasoning
Bayesian reasoning is the formal process that we use to update our beliefs about the world once we’ve observed some data.
1.1 Reasoning About Strange Experiences
Will Kurt show with an UFO example how Bayesian thinking about beliefs and their updates when new data come is very natural and a common sense procedure. This is an interesting approach I haven’t thought before, because many Bayesian introductions are not only very complex but develops formulae that we are not using in the everyday world.
Bayesian reasoning procedure:
- Observe data
- Build a hypothesis
- Update your beliefs based on new data
1.1.1 Observing Data
1.1.2 Holding Prior Beliefs and Conditioning Probabilities
The probability outcome is called a conditional probability because we are conditioning the probability of one event occurring on the existence of something else.
Shorter variable names for events and conditions:
- D: all of our data
- X: prior belief
Let
1.1.3 Conditioning on Multiple Beliefs
1.1.4 Assuming Prior Beliefs in Practice
In order to explain what you saw, you need to form some kind of hypothesis—a model about how the world works that makes a prediction. All of our basic beliefs about the world are hypotheses.
- If you believe the Earth rotates, you predict the sun will rise and set at certain times.
- If you believe that your favorite baseball team is the best, you predict they will win more than the other teams.
- A scientist may hypothesize that a certain treatment will slow the growth of cancer.
- A quantitative analyst in finance may have a model of how the market will behave.
But what is this hypothesis predicting? We might ask, “If there was a UFO in your back yard, what would you expect to see?” And you might answer, “Bright lights and a saucer-shaped object.” Formally we write this as:
This equation says: “The probability of seeing bright lights and a saucer-shaped object in the sky, given my belief that this is a UFO and my prior experience, is much higher [indicated by the double greater-than sign >>] than just seeing bright lights and a saucer-shaped object in the sky without explanation.”
1.1.5 Spotting Hypotheses in Everyday Speech
- Saying something is “surprising,” for example, might be the same as saying it has low-probability data based on our prior experiences.
- Saying something “makes sense” might indicate we have high-probability data based on our prior experiences.
1.2 Gathering More Evidence and Updating Your Beliefs
To collect more data, we need to make more observations. In our scenario, you look out your window: With new evidence, you realize it looks more like someone is shooting a movie nearby.
Bayesian analysis process
- You started with your initial hypothesis:
. - In isolation, this hypothesis, given your experience, is extremely unlikely:
- With new data you are going to update your belief:
. - In isolation, the probability of this hypothesis is also intuitively very low:
- You updated your prior belief from “very, very low” to “very low”.
1.3 Comparing Hypotheses
With new data you have formed an alternate hypothesis. Let’s break this process down into Bayesian reasoning. Your first hypothesis,
You started with
When this ratio is a large number, say 1,000, it means “
1.4 Data Informs Belief; Belief Should Not Inform Data
One final point worth stressing is that the only absolute in all these examples is your data. Your hypotheses change, and your experience in the world,
Case 1 (used throughout this chapter):
Case 2 (used often in everyday thinking)
In the first case, we change our beliefs according to data we gather and observations we make about the world that describe it better. In the second case, we gather data to support our existing beliefs. Bayesian thinking is about changing your mind and updating how you understand the world. The data we observe is all that is real, so our beliefs ultimately need to shift until they align with the data.
1.5 Wrapping Up
You should be far more concerned with data changing your beliefs
1.6 Exercises
Try answering the following questions to see how well you understand Bayesian reasoning. The solutions can be found at No Starch Press (PDF).
Exercise 1.1 Rewrite the following statements as equations using the mathematical notation you learned in this chapter:
- The probability of rain is low:
- The probability of rain given that it is cloudy is high:
- The probability of you having an umbrella given it is raining is much greater than the probability of you having an umbrella in general:
Exercise 1.2 Organize the data you observe in the following scenario into a mathematical notation, using the techniques we’ve covered in this chapter. Then come up with a hypothesis to explain this data:
- You come home from work and notice that your front door is open and the side window is broken. As you walk inside, you immediately notice that your laptop is missing.
Exercise 1.3 The following scenario adds data to the previous one. Demonstrate how this new information changes your beliefs and come up with a second hypothesis to explain the data, using the notation you’ve learned in this chapter.
- A neighborhood child runs up to you and apologizes profusely for accidentally throwing a rock through your window. They claim that they saw the laptop and didn’t want it stolen so they opened the front door to grab it, and your laptop is safe at their house.