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.

  • 16
    $\begingroup$ Learn the derivation, not the equation. $\endgroup$ Commented Jun 14, 2015 at 8:51
  • 6
    $\begingroup$ "What do/did you do to remember Bayes' rule?" uh, it's easy: I don't. +1 to @Anony-Mousse. $\endgroup$
    – user541686
    Commented Jun 14, 2015 at 9:48
  • $\begingroup$ I find it easiest to just re-derive it each time I need it. $\endgroup$ Commented Jun 17, 2015 at 2:26
  • $\begingroup$ posterior is proportional to likelihood times prior prior = p(A) likelihood = p(A|B) posterior = p(B|A) $\endgroup$
    – Mike
    Commented Aug 3, 2018 at 13:13

7 Answers 7


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.


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)$


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






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.


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

  • 1
    $\begingroup$ ABB BAA. (You could also think ABBA, as in the name of the famous band.) $\endgroup$
    – moonman239
    Commented Jun 15, 2015 at 21:02

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.


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.


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)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.