Bayesian Inference and Base Rates
Probability Overview
Probability: the probability of an event is the chance that occurs. We denote it as .
Probability Space: a probability space is a set of all possible outcomes of an experiment. We denote it as .
- Sample space = total area. So,
- We use Venn Diagram to depict probabilities graphically.
Independent Events: two events and are independent if they are unrelated. Independent events satisfy the following formula for their joint probability:
Conditional Probability: the probability of an event given that another event has occurred. We denote it as .
- To calculate conditional probability, we have the following formula:
- The notation $\mid$ is called a pipe. It is read as "given that" or "conditional on".
Joint Probability: the probability of two events and occurring together. We denote it as .
- To calculate joint probability, we have the following formula:
- Law of Total Probability: If we have an event that takes on values and an event conditional on it, then
- This is a simple-weighted average.
Flipping Conditional Probability
- Bayes' Rule: a formula that allows us to flip conditional probabilities:
Bayes' Rule
- Bayes' Rule and Binary Events.
- Binary events: only two potential outcomes
- When we have binary events, it is useful to re-write as where means "not ".
- Then, Bayes' Rule becomes
Medical Testing
- Positive Test Results
- False Positive Rate of 5%: If you don't have the disease, the test correctly return a negative result 95% of the time.
- In statistics: Type I error
- False Negative Rate of 5%: If you do not have the disease, the test correctly returns a positive result 5% of the time.
- In statistics: Type II error
- False Positive Rate of 5%: If you don't have the disease, the test correctly return a negative result 95% of the time.
- Application:
- Given and . Find
- By Bayes' Rule, we have
- So, we will need to know and .
Information, Beliefs, Priors, and Posteriors
- Bayes' Theorem in Use:
- Prior: our beliefs, such as for having the disease
- Evidence: the new information we have, such as , positive test result
- Posterio: update our beliefs based on the evidence, such as
- Balancing prior and evidence
- The new information seems damming, but the prior pushes in the other direction.
- But now that we know that we are in one of these extremely unlikely scenarios.
- We have to ask about the relative likelihood of each one.
- Bayes' Rates:
- Sometimes, we will use the term bayes' rates to refer to the priors.
- In order to compute the quantity of interest, , we need to know the base rate of , .
- Lots of analysts draw incorrect inferences because they fail to consider the base rate.
Bayes' Theorem and Quantitative Analysis
- Bayes' Theorem and Quantitative Analysis
- Most quantitative analysts conduct hypothesis test and compute p-values.
- We've already discussed some reasons why the p-value might lead us astray.
- But any given study is not all that we know about something.
- When an analyst finds a low p-value and concludes that their finding must be true, they've made the same mistake as the mathematician and the prosecutor in People v. Collins.
- They calculated
- What's the chance that I have an estimate of this size given there was no effect
- The probability of bad luck driving my result
- However, we really want to compute
- What's the probability that there is no effect given my estimate.
- They calculated
- Most quantitative analysts conduct hypothesis test and compute p-values.
- Bayes' and Estimated Effect
- Suppose we've analyzed some data and obtained a statistically significant effect at the .05 level. (i.e., p<.05)
- What's the probability that the estimated effect is genuine? - Bayes' Theorem!
- We know
- The significance level used in our hypothesis test
- If we would declare a statistically significant estimate if p<.05, then
- We don't know the others, but they can be calculated:
- is the statistical power of the test
- Assuming the effect is genuine, how likely that we would obtain a sigficant estimate?
- There are ways of estimating the statistical power once we know some things about the data.
- is the prior probability that there is a genuine effect
- Our belief that there is an effect before seeing any of the statistical evidence.
- is the statistical power of the test
- We know
- New Bayes' Rule: