In probability theory and applications, Bayes’ theorem (alternatively Bayes’ law or Bayes’ decision rule) links a conditional probability to its inverse. That is, it provides the relationship between P(A | B) and P(B | A). It is valid in all common interpretations of probability, and is commonly used in science and engineering.[1] The theorem is named for Thomas Bayes (pronounced /ˈbeɪz/ or “bays”).
To illustrate, suppose J. Doe is a randomly chosen American who was alive on January 1, 2000. According to the United States Center for Disease Control, roughly 2.4 million of the 275 million Americans alive on that date died during the 2000 calendar year. Among the approximately 16.6 million senior citizens (age 75 or greater) about 1.36 million died. The unconditional probability of the hypothesis that our J. Doe died during 2000, H, is just the population-wide mortality rate P(H) = 2.4M/275M = 0.00873. To find the probability of J. Doe’s death conditional on the information, E, that he or she was a senior citizen, we divide the probability that he or she was a senior who died, P(H & E) = 1.36M/275M = 0.00495, by the probability that he or she was a senior citizen, P(E) = 16.6M/275M = 0.06036. Thus, the probability of J. Doe’s death given that he or she was a senior is PE(H) = P(H & E)/P(E) = 0.00495/0.06036 = 0.082. Notice how the size of the total population factors out of this equation, so that PE(H) is just the proportion of seniors who died. One should contrast this quantity, which gives the mortality rate among senior citizens, with the “inverse” probability of E conditional on H, PH(E) = P(H & E)/P(H) = 0.00495/0.00873 = 0.57, which is the proportion of deaths in the total population that occurred among seniors.

Here are some straightforward consequences of (1.1):
Probability. PE is a probability function.[2]
Logical Consequence. If E entails H, then PE(H) = 1.
Preservation of Certainties. If P(H) = 1, then PE(H) = 1.
Mixing. P(H) = P(E)PE(H) + P(~E)P~E(H).[3]
The most important fact about conditional probabilities is undoubtedly Bayes’ Theorem, whose significance was first appreciated by the British cleric Thomas Bayes in his posthumously published masterwork, “An Essay Toward Solving a Problem in the Doctrine of Chances” (Bayes 1764). Bayes’ Theorem relates the “direct” probability of a hypothesis conditional on a given body of data, PE(H), to the “inverse” probability of the data conditional on the hypothesis, PH(E).
(1.2) Bayes’ Theorem.
PE(H) = [P(H)/P(E)] PH(E)
In an unfortunate, but now unavoidable, choice of terminology, statisticians refer to the inverse probability PH(E) as the “likelihood” of H on E. It expresses the degree to which the hypothesis predicts the data given the background information codified in the probability P.
Begin by having a look at the theorem, displayed below. Then we’ll look at the notation and terminology involved.

In this formula, T stands for a theory or hypothesis that we are interested in testing, and E represents a new piece of evidence that seems to confirm or disconfirm the theory. For any proposition S, we will use P(S) to stand for our degree of belief, or “subjective probability,” that S is true. In particular, P(T) represents our best estimate of the probability of the theory we are considering, prior to consideration of the new piece of evidence. It is known as the prior probability of T.
Bayes’ Theorem, sometimes called the Inverse Probability Law, is an example of what we call statistical inference. It is very powerful. In many situations, people make bad intuitive guesses about probabilities, when they could do much better if they understood Bayes’ Theorem.
Recall that the definition of conditional probability is:
[1] P(B|A) = P(A and B)/P(A)
Bayes’ Theorem is used to solve for the inverse conditional probability, P(A|B). By definition,
[2] P(A|B) = P(A and B)/P(B)
Solving [1] for P(A and B) and substituting into [2] gives Bayes’ Theorem:
P(A|B) = [P(B|A)][P(A)]/P(B)
We can use Bayes’ Theorem to find the conditional probability of event A given the conditional probability of event B and the unconditional probabilities of events A and B.
For example, we said that Bernie Williams is a .400 hitter with a runner in scoring position. In other words, P(B|A) = 0.4. We also said that the unconditional probability of Bernie Williams coming up with a runner in scoring position is 0.2, and that the unconditional probability of Bernie Williams getting a hit is 0.3.
Therefore, if you are given the information that Bernie Williams got a hit, you can infer something about the probability that there was a runner in scoring position. Using Bayes’ Theorem,
P(A|B) = [P(B|A)][P(A)]/P(B) = [0.4][0.2]/[0.3] = .267
What this says is that when we are given the information that Bernie Williams got a hit, we should estimate the probability that he came up with a runner in scoring position as .267, which is higher than the unconditional probability of 0.2 that he will come up with a runner in scoring position.
The importance of accurate data in quantitative modeling is central to the subject raised in the question: using Bayes’s theorem to calculate the probability of the existence of God. Scientific discussion of religion is a popular topic at present, with three new books arguing against theism and one, University of Oxford professor Richard Dawkins’s book The God Delusion, arguing specifically against the use of Bayes’s theorem for assigning a probability to God’s existence. (A Google news search for “Dawkins” turns up 1,890 news items at the time of this writing.) Arguments employing Bayes’s theorem calculate the probability of God given our experiences in the world (the existence of evil, religious experiences, etc.) and assign numbers to the likelihood of these facts given existence or nonexistence of God, as well as to the prior belief of God’s existence–the probability we would assign to the existence of God if we had no data from our experiences. Dawkins’s argument is not with the veracity of Bayes’s theorem itself, whose proof is direct and unassailable, but rather with the lack of data to put into this formula by those employing it to argue for the existence of God. The equation is perfectly accurate, but the numbers inserted are, to quote Dawkins, “not measured quantities but & personal judgments, turned into numbers for the sake of the exercise.”

Lido Anthony “Lee” Iacocca (play /ˌaɪ.əˈkoʊkə/ eye-ə-koh-kə; born October 15, 1924) is an American businessman known for engineering the Mustang, the unsuccessful Ford Pinto, being fired from Ford Motor Company, and his revival of the Chrysler Corporation in the 1980s.[1] He served as President and CEO from 1978 and additionally as chairman from 1979, until his retirement at the end of 1992.