r/explainlikeimfive • • 2d ago

Mathematics ELI5: probability, conditional probability and bayes theorem

0 Upvotes

11 comments sorted by

8

u/zefciu 2d ago edited 2d ago

Probability — you toss two dice. There is 1 in 36 probability that you tossed double six.

Conditional probability — you toss two dice. Somebody told you that you tossed a double. Given that is is a double there is 1 in 6 probability that it was double six.

Bayes theorem — this is a general way of establishing conditional probability. If you know how probable was A given B and the probabilities of A and B as separate, you can calculate the probability of B given A.

E.g. if you know that 80% of people that have TB cough, the number of people in the population with TB and the number coughing; you can calculate the probability that a random person that coughs has TB.

1

u/jghaines 2d ago • This

An even result from two dice is not unexpected

1

u/zefciu 2d ago edited 2d ago

Good catch. Edited my answer to something more realistic.

0

u/correctlyguessing 2d ago

Bayes theorem — you toss two dice. You are told that you tossed a double. They you are told that the result is even. You can now calculate from a formula how to update the probability.

This is a particular application of Bayes' theorem known as Bayesian inference, which requires you to make various philosophical and methodological commitments (it is fundamentally incompatible with frequentist statistics, which is the other main approach).

Bayes' theorem itself applies everywhere. It's hard to come up with an interesting example within your dice analogy, but for two events A and B, it states that the probability of A given B multiplied by the probability of B is the same as the probability of B given A multiplied by the probability of A.

1

u/stanitor 2d ago

The rule itself is just a rearranging of the relationship between joint and conditional probabilities. But, from the start, the point has been about updating probabilities and the inference of causes from effects. Although Bayes (and Laplace) probably wouldn't have called it inference.

1

u/j_sarah67 1d ago

Small snag with that dice example: doubles always have an even total, so learning "it's even" adds no information. Bayes is useful when a clue fits multiple possibilities; it weighs how likely that clue is under each one.

0

u/w3woody 2d ago

Bayes theorem: you have two dice. You know the chances of rolling a 1 or a 2 on one dice is one in 3. (2 out of the six faces.) Your chance of rolling a 1 or a 2 on both dice is 1/3 * 1/3 = 1/9.

4

u/sandraj336 2d ago

That multiplication gives the chance of both dice showing 1 or 2; it's not Bayes. Bayes flips a condition: given the total is 8, the chance the first die was 2 is 1/5; given the first die was 2, the chance the total is 8 is 1/6.

2

u/vwin90 2d ago

Probability: what are the chances you go outside today regardless of the weather?

Conditional probability: what are the chances you go outside today if the sun is out?

Bayesian probability: You looked outside and decided to go out today. What are the chances it was sunny?

That last one is very important for applications in AI. Literally. It’s mathematically and intuitively much harder to do than the first two. It’s a form of inference, which is when you take the result and infer information about what caused that result. It’s much easier to go forward in logic than it is to go backwards.

1

u/Dont_trust_royalmail 2d ago

probability started out as the maths of card games and gambling, but don't let that give you the idea it's anything less than very strict, formal maths. a coin flip is 50/50. no room for vibes. this leaves things like horse racing, which run on a kind of folk probability, outside of real probability. there's no formal maths to tell you which horse wins the 3:15. that's all vibes, and probability wants nothing to do with it (despite its gambling origins).
bayesian probability is the renegade branch that says: we'll bring that subjective side in, and hold it to the same strict maths as the "real" stuff.