The probability that belief A is true, given new evidence B is equal to the probability of B given A times the probability of A (regardless of B) divided by the probability of B (regardless of A).
For example, suppose you are getting a medical test to find out if you have a disease. The disease only appears in 1 out of 100 people and the test is 99% accurate. What is the likelihood you have the disease if you receive a positive test result?
Plugging it into the equation:
P(A|B)
The probability of having the disease given a positive test result (what we want to find out).
P(B|A) = 99%
Probability that the test is accurate if you actually have the disease.
P(A) = 1%
Probability of having the disease regardless of the test.
P(B) = (1% x 99%) + (1% x 99%)
The probability the test is accurate means summing a positive test result and the probability of a false negative test result. To get the false negatives if you have a population where 100 people have the disease and take the test which is 99% accurate, you get 1 false negative.
Result
There’s a 50% probability you have the disease given a positive test result
(99% x 1%) / ((1% x 99%) + (1% x 99%)) = 50%