Separating impossible evidence from a posterior probability of zero
Bayes' theorem divides by the probability of the evidence, so a model that gives the evidence zero probability cannot produce a posterior. A posterior of zero is a different thing. This guide separates the two cases with the Bayes Theorem Calculator.
Where the denominator comes from
The calculator computes the posterior as likelihood × prior ÷ evidence, where evidence = likelihood × prior + alternative × (1 − prior). The likelihood is the chance of the signal when the hypothesis is true, and the alternative is the chance of the same signal when it is false. Their weighted sum is the total probability of seeing the signal at all. Dividing by that total rescales the numerator into a probability. If the total is zero, the division has no defined value. That is a property of the supplied model, and it is separate from the case where the numerator alone is zero. The two failure modes need different responses, which is the point of the comparison that follows.
A model under which the signal cannot occur
Set the prior to 0.5 and both likelihoods to zero. The evidence is 0 × 0.5 + 0 × 0.5 = 0, so the model says the observed signal is impossible whether or not the hypothesis holds. The calculator rejects the input with a message that the denominator must not be zero. This is the correct behavior. A conditional probability given an event of probability zero is undefined in this elementary setting, and returning 0 or 1 would invent an answer the model cannot support. The prior of one half plays no role here: any prior between 0 and 1 gives the same rejection when both likelihoods are zero. The condition for rejection is about the signal, not about the hypothesis: the sentence "this evidence could never have been observed" is what the zero denominator encodes, and a model that says so about the data in hand has already been contradicted by the data.
A model where the posterior is zero
Now take prior 0, likelihood 1 and alternative 0.2. The evidence is 1 × 0 + 0.2 × 1 = 0.2, which is positive, so the signal is possible under the alternative. The posterior is 1 × 0 ÷ 0.2 = 0. The calculator returns an evidence value of 0.2 and a posterior of 0 without complaint. The meaning is that a hypothesis given no prior probability stays at zero no matter how strongly the evidence favors it. This is a legitimate result, and it is also a warning about priors of exactly zero, which no amount of data can move in this model. In words, the hypothesis was ruled out before the evidence arrived, so the evidence is only compared with itself under the alternative and the hypothesis gets no weight. Whether such a prior is reasonable depends on the application. If the hypothesis is merely unlikely, a small positive prior such as 0.001 keeps the update alive and lets strong evidence matter.
Comparing the two outputs side by side
The first case has no evidence probability and no posterior. The second has an evidence probability of 0.2 and a posterior of 0. Reporting both as "the posterior is zero" would hide the difference between a calculation that cannot be done and one that has been done. The distinction affects what you do next. A rejected calculation sends you back to the model: either the likelihoods are wrong or the evidence was never possible. A zero posterior with positive evidence sends you to the prior, asking whether a probability of exactly zero was intended.
A nonzero example for reference
With prior 0.5, likelihood 0.9 and alternative 0.2, the evidence is 0.9 × 0.5 + 0.2 × 0.5 = 0.55, and the posterior is 0.45 ÷ 0.55, about 0.8182. A screening-style example with prior 0.01, likelihood 0.9 and alternative 0.05 gives evidence 0.009 + 0.0495 = 0.0585 and a posterior of 0.009 ÷ 0.0585, about 0.1538. These illustrate how a small prior keeps the posterior modest even with a strong likelihood. Both are abstract inputs and carry no claim about any real test or condition.
The opposite extreme: a prior of one
A prior of 1 behaves like a prior of 0 in the other direction. With prior 1, likelihood 0.3 and alternative 0.2, the evidence is 0.3, and the posterior is 0.3 × 1 ÷ 0.3 = 1. The alternative likelihood gets multiplied by (1 − 1) = 0 and drops out. A certain hypothesis stays certain after any possible evidence. Between the two extremes, every prior strictly between 0 and 1 can be moved by evidence, which is why careful modeling usually avoids assigning exact 0 or 1 unless the hypothesis is impossible or certain by definition.
What to revisit after a rejection
When the denominator is zero, review the pieces in order. First, confirm that likelihood and alternative are probabilities of the same observed evidence under the two cases, not probabilities of different events. Second, check whether a likelihood was entered as zero because it was missing and not because the model truly excludes it. Third, consider whether the observed evidence was dropped too aggressively by a rule such as treating very rare signals as impossible. Replacing a zero with a small positive value is a modeling decision with consequences, and it should be made openly and recorded.
What a rejected posterior does not say
The rejection says that this supplied model cannot condition on this event. It does not provide a replacement prior or likelihood, and it does not say which input to alter. The calculator also works with a single hypothesis and its complement, one signal and fixed probabilities. Real diagnostic or classification problems often involve several hypotheses, correlated evidence and uncertain inputs, which fall outside this page. Keep the original assumptions visible next to the output so that a zero, or a refusal, can be read in the context that produced it. The probabilities in this guide are inputs chosen to illustrate the arithmetic, and none of them describe a real test, a medical condition or a forecast of any kind.
Likelihoods that are small but not zero
A rejection happens only at exactly zero total evidence, and a tiny positive value produces a valid but extreme result. With prior 0.5, likelihood 0.001 and alternative 0.001, the evidence is 0.001 and the posterior is 0.5, equal to the prior, because the signal is equally unlikely under both cases and so carries no information. With prior 0.5, likelihood 0.001 and alternative 0.0001, the evidence is 0.00055 and the posterior is 0.0005 ÷ 0.00055, about 0.909. The ratio of the two likelihoods, not their absolute size, drives the update, and here the ratio of ten to one moves the prior of 0.5 up to about 0.91. A rare signal can therefore be strongly informative, while a model in which the signal is truly impossible cannot be updated at all.
Reproduce the checks
Zero evidence under both categories
Open the Bayes Theorem Calculator and enter:
- Prior probability of A
0.5- Probability of evidence given A
0- Probability of evidence given not A
0
Expected rejection:
denominator must not be zeroThe posterior denominator is zero.
Defined evidence and zero numerator
Open the Bayes Theorem Calculator and enter:
- Prior probability of A
0- Probability of evidence given A
1- Probability of evidence given not A
0.2
Expected output:
Probability of evidence
0.2Posterior probability of A
0The evidence is possible under the alternative category.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- Primary reference for Bayes Theorem Calculator ↗ · 2026-10-08