16

I think a good way to remember the formula is to think of the formula like this:

The probability that some event A has a particular outcome given an independent event B's outcome = the probability of both outcomes occurring simultaneously / whatever we'd say the probability of event A's desired outcome would be if we didn't know event B's outcome.

As an example, consider a disease test: If we have a patient who tests positive for a disease, and we know that: 40% of diseased persons tested positive on our test; 60% of all people have this disease; and 26% of all people tested positive for this disease; then it follows that:

1) 24% of all people we sampled tested positive and had the disease, meaning 24 out of 26 people who tested positive had the disease; therefore, 2) there is a 92.3% chance that this particular patient has the disease.

moonman239
  • 301
  • 3
  • 8

7 Answers7

22

It may help to recall that it follows from the definition of conditional probability:

$$p(a|b) = \frac{p(a,b)}{p(b)}$$ $$p(a,b) = p(a|b)p(b) = p(b|a)p(a)$$ $$p(a|b) = \frac{p(b|a)p(a)}{p(b)}$$

In other words, if you remember how joint probabilities factor into conditional ones, you can always derive Bayes rule, should it slip your mind.

Sean Easter
  • 8,359
  • 2
  • 29
  • 58
14

A simple way that has helped my students is to write $P(A \cap B)$ in two different ways as conditional probabilities:

$P(A \cap B)=P(A|B)P(B)$

and

$P(A \cap B)=P(B|A)P(A)$

Then

$P(A|B)P(B)=P(B|A)P(A)$

and

$P(B|A)=\frac{P(A|B)P(B)}{P(A)}$

Brian Borchers
  • 5,015
  • 1
  • 18
  • 27
7

I worry about understanding the concept behind the formula. Once you have understood a concept, the underlying simple formula is stuck in your mind. Sorry for the stand-offish answer, but that's it.

stochazesthai
  • 4,616
  • 2
  • 18
  • 26
6

I personally think this for is just easier to remember:$$P(A|B)P(B)=P(B|A)P(A)$$

Mandrill
  • 208
  • 1
  • 7
4

Here's my little unorthodox (and dare I say unscientific) trick for remembering Bayes Rule.

I simply say ---

"A given B equals the reverse times A over B"

That is to say,

The probability of A given B P(A | B) equals the reverse (B | A) times A over B P(A) / P(B).

Put in full,

$$P(A | B) = \frac{P(B | A) * P(A)}{P(B)}$$

And with that I never forget it.

Ekaba Bisong
  • 229
  • 3
  • 12
3

If you have clear which terms have to go into the equation ("it is a formula that shows a direct proportionality between $P(A|B)$ and $P(B|A)$ using $P(B)$ and $P(A)$"), there is really only one possibility of confusion: $$ P(B|A)=\frac{P(A|B)P(B)}{P(A)} \quad \text{vs} \quad P(B|A)=\frac{P(A|B)P(A)}{P(B)}. $$ To remember what goes into the numerator, think to what happens if the event $B$ is impossible ($P(B)=0$). You want $P(B|A)$ to be zero, too, so it must be in the numerator.

Federico Poloni
  • 339
  • 2
  • 13
1

A person --> disease --> test positive (red)

A person --> disease --> test negative (yellow)

A person --> no disease --> test positive (blue)

A person --> no disease --> test negative (green)

To better remember Bayes' rule, draw the above into a tree structure and mark the edges with color. Say we want to know P(disease | test positive). Given test result being positive, two possible paths are "red" and "blue", and conditional probability of having a disease is the conditional probability of being "red", thus P(red) / (P(red) + P(blue)). Apply chain rule and we have:

P(red) = P(disease) * P(test positive | disease)

P(blue) = P(no disease) * P(test positive | no disease)

P(disease | test positive) = P(disease) * P(test positive | disease) / (P(disease) * P(test positive | disease) + P(no disease) * P(test positive | no disease)) = P(disease, test positive) / P(test positive)