TylerJay comments on Bragging Thread March 2015 - Less Wrong

5 Post author: Morendil 08 March 2015 01:50PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (19)

You are viewing a single comment's thread.

Comment author: TylerJay 15 March 2015 08:48:18AM *  3 points [-]

I derived Bayes' Theorem and the basic rule for conditional probabilities today while trying to find the answer to a question.

I had seen Bayes' Theorem before, but never really understood it and certainly had never memorized it. The only relevant knowledge I had was:

  • That the syntax for "probability of A given B" is p(A|B)
  • That you can multiply independent probabilities to do AND, but aren't allowed to do that if they are dependent

I was surprised at how it followed directly from intuition and the last bullet point above. I put together a toy problem involving the probability that I go outside depending on if it's raining or not and was able to derive Bayes' Theorem essentially from first principles. Not a groundbreaking accomplishment or anything, but I know I'll never forget any of it now!

The line of reasoning was really simple once I was able to distill it:

  1. I can simulate the probability that I'm outside given that it's raining by first rolling a die to see if it's raining, and if it is, then rolling another die to see if I'm outside, since I already know it's raining.
  2. These are clearly independent events, so I should be able to multiply their probabilities to get the probability of their conjunction.
  3. What does the conjunction mean? Intuitively, I'm outside and it's raining exactly when each of those die rolls turned up True, so this multiplication must give the probability that I'm outside and it's raining: p(outside|raining) * p(raining) = p(outside AND raining)
  4. And if that works, then symmetrically, this same probability p(outside AND raining) should also be equal to the probability that it's raining given that I'm outside times the probability that I'm outside.
  5. Isolate p(outside|raining) on one side of the equation and Boom: Bayes' Theorem.

p(A|B) * p(B) = p(A & B) = p(B|A) * p(A)

p(A|B) * p(B) = p(B|A) * p(A)

p(A|B) = [p(B|A) * p(A)] / p(B)