Index > Course > 2021-03-23: Probabilities, Confidence, and Causality

2021-03-23: Probabilities, Confidence, and Causality

As long as you can do the homework, any regression software will work. Excel isn’t as nice, but it works. Examples will be provided in Stata.

Assignment 3 is due tonight, Assignment 4 is released.

For March 25th, read “An Introduction to Regression Analysis”

For March 30th, read chapters 1, 2, and 4 from “The Signal and the Noise”

The Three Card Monte Example

Frequentist Approach

Null Hypothesis: Everything is fine. We will gather some evidence, and see if that evidence contradicts this point.

We expect a 66.7% chance of loosing any given game.

Given that we have lost n games in a row, what is the probability of this happening under the null hypothesis?

\[P(n)=(\frac{2}{3})^n\]

The probability of n losses is equal to two-thirds to the n power

$n$ $P(n)$
1 0.6667
2 0.4444
3 0.2963
4 0.1975
5 0.1317
6 0.0878
7 0.0585
8 0.0390
9 0.0260
10 0.0173

After the 8th loss, we can be 95% confident that the game is rigged.

Bayesian

Remember the magic incantation:

\[P(A\|B)=\frac{P(B\|A)P(A)}{P(B)}\]

Where $A = $ “The game is rigged”, and $B =$ “I lost”.

We enter the game with a 40% belief that the game is rigged.

\[P(B) = 1*P(A_{n-1}) + (2/3)*(1-P(A_{n-1}))\]

The probability that we loose, is the probability of loss if the game is rigged (1), plus the probability of loss if the game is fair (2/3). These are weighted by the probability of their respective outcomes.

Now, I can use a simple program to calculate these values after each loss:

let prior = 0.4;
for(let n=1; n<10; n++){
    let p_b = prior + 2/3*(1-prior);
    let p_a = prior / p_b;
    console.log(`${n} | ${p_a.toFixed(3)} | ${p_b.toFixed(3)}`);
    prior = p_a;
}

Here’s the output in table format:

$n$ $P(A|B)$ $P(B)$
1 0.500 0.800
2 0.600 0.833
3 0.692 0.867
4 0.771 0.897
5 0.835 0.924
6 0.884 0.945
7 0.919 0.961
8 0.945 0.973
9 0.962 0.982

After the 9th loss, we have 96% confidence that the game is rigged.

A relationship between A and B

Ice cream sales and Murders are positively correlated.

There are 4 explanations for this.

Regression

“Fear always finds its victim” - Prof.

Regression describes the relationship between some variables in the presence of noise.

There are at least two variables, called the:

Long story short, one “causes” the other.


Index > Course > 2021-03-23: Probabilities, Confidence, and Causality