GLOBAL KNOWLEDGE ARK

Mathematics · Article

Bayes’s rule and updating beliefs

Derive Bayesian updates from conditional probability, compare priors and likelihoods, and handle sequential evidence without double-counting. Extend the same reasoning to parameter densities, prediction, conjugate models and checks of scientific assumptions.

Back to Mathematics

After reading, you can

  • Distinguish a hypothesis, prior, likelihood, joint evidence weight and posterior probability in a declared model.
  • Derive Bayes’s rule and compute its evidence denominator from disjoint exhaustive alternatives.
  • Explain how base rates affect a reverse conditional without changing an instrument’s stipulated conditional performance.
  • Update odds with correctly defined likelihood ratios, including evidence against a hypothesis.
  • Combine sequential evidence using conditional likelihoods and recognize copied or correlated observations.
  • Account for selection and distinguish likelihoods for ordered records from likelihoods for counts.
  • In optional extensions, normalize continuous posterior densities and derive beta and normal updates with explicit assumptions.
  • Separate parameter uncertainty, prediction, model checking, calibration and causal interpretation.
01

Name the question before updating

An inspection flag is an observation, not a diagnosis of its source. To ask whether a flagged component is defective, name H={the selected component is defective} and E={the inspection produces a flag}. The forward question P(E|H) asks how often the inspection flags a defective component under the model. The reverse question P(H|E) asks how much of the flagged population is defective. Lesson 151 showed why those questions have different denominators. Bayes’s rule expresses the reverse calculation using a prior probability and forward conditional information.

The prior P(H) describes the uncertainty about the selected component before the new evidence E is used. It belongs to a stated reference population and selection procedure. A randomly selected component from all production, one sent for repair and one already screened by another instrument can have different prior defect probabilities. A prior is not simply any convenient percentage from a nearby study. Its interpretation depends on what was known and which case is being considered.

The likelihood P(E|H) describes how compatible this particular evidence event is with H under the observation model. For the competing alternative Hᶜ, we also need P(E|Hᶜ). A flag can occur in either state. The posterior P(H|E) combines their prior frequencies and their evidence probabilities. It does not discard the prior merely because an instrument has a high flag rate on defective components.

All numbers in this lesson’s factory, coin and sensor examples are hypothetical teaching inputs. The arithmetic can be exact within those assumptions without establishing that a real instrument behaves that way. Choosing hypotheses, sampling rules, likelihoods and priors is model building. Updating follows after those choices; checking their adequacy remains a scientific task.

The word belief here means a quantified uncertainty represented by a probability model. It does not require that the physical defect changes when information arrives. A posterior can describe uncertainty about a fixed but unknown state, a population category or an unknown numerical parameter. Keep the object being described and the source of randomness explicit as the examples become more advanced.

02

Two routes to the same intersection

For P(H)>0 and P(E)>0, write the shared intersection in two ways: P(H∩E)=P(E|H)P(H)=P(H|E)P(E). Dividing by P(E) gives P(H|E)=P(E|H)P(H)/P(E). The rule is therefore a consequence of conditional probability, rather than a separate assumption about independent events. Evidence and hypothesis need not be independent; an informative update typically depends on their association.

The numerator P(E|H)P(H) is a joint probability. It measures how much of the original probability mass both belongs to H and produces E. The denominator P(E) is the mass of all outcomes that produce E, including those outside H. The posterior asks what fraction of that evidence-compatible mass lies in H. Keeping the joint numerator visible avoids the common error of normalizing likelihoods without the prior weights.

The universally valid event expression is P(H|E)=P(H∩E)/P(E) for positive P(E). Replacing the numerator by a likelihood times a prior requires either positive P(H) or a separately supplied generative conditional rule. If H has zero prior mass, its intersection is zero by containment; its ordinary event likelihood given H is not defined by a ratio. Zero-prior alternatives should not be supplied invented conditionals merely to make a formula look complete.

When P(E)=0, elementary event Bayes is undefined. The model assigned no mass to the observed evidence event, so all posterior event ratios on E have zero denominator. This calls for inspecting the observation and model, or for using an explicitly specified continuous conditional-law construction when appropriate. Adding an arbitrary small number to the denominator would change the problem and would not justify a probability update.

The posterior is conditional on the model as well as on the evidence, even when the model symbol is omitted for readability. If important alternatives are excluded, likelihoods are wrong or the prior population is mismatched, a precise fraction can still answer the wrong scientific question. Mathematical coherence is necessary; it does not replace thoughtful model construction and checking.

03

Normalize the joint weights of all alternatives

Let H₁,…,Hₖ be mutually exclusive and exhaustive hypothesis events. For a positive-probability evidence event E, the joint weights wᵢ=P(E∩Hᵢ) are nonnegative and sum to P(E). For every positive-prior cell, wᵢ=P(E|Hᵢ)P(Hᵢ). The posterior weights are wᵢ/Σⱼwⱼ and sum to one. A zero-prior cell contributes a zero joint mass and need not have an event-ratio likelihood. This construction is a partition calculation followed by conditioning.

Suppose suppliers A,B,C provide proportions 1/2,3/10,1/5 of components. Their conditional inspection-flag probabilities are 1/100,1/50,1/20. The joint source-and-flag masses are 1/200,3/500,1/100, or 5/1000,6/1000,10/1000. The evidence probability is 21/1000. Among flagged components, the source probabilities are 5/21,6/21,10/21. Supplier C provides only one fifth of all components but 10/21 of the flags in this model.

A prior bar chart, likelihood labels, joint bars and posterior bars have different meanings. Prior and posterior probabilities each sum to one across the alternatives. The likelihoods generally do not: they are conditional probabilities of E under different conditions. The joint bars sum to the evidence probability 21/1000, not to one. A visual should label these scales instead of presenting every column as if it were another normalized distribution.

W1 · Three suppliers

Sources, joint mass and posterior sharesW1 · Three suppliers. A: prior 1/2, conditional flag rate 1/100, posterior 5/21. B: prior 3/10, conditional flag rate 1/50, posterior 2/7. C: prior 1/5, conditional flag rate 1/20, posterior 10/21. In the upper mosaic the green area is joint mass; the lower bar renormalises those joint masses by the evidence.Sources, joint mass and posterior sharesColumn width = prior; green height = P(E | source)A1/2B3/10C1/510Posterior shares within the evidence populationA: 5/21B: 2/7C: 10/2101/41/23/41cumulative population share / posterior share
Prior column width times conditional height encodes joint area; posterior shares divide those areas by the evidence.
Declared conditions and calculated quantities: W1 · Three suppliers
Quantity or conditionExact result, labelled approximation or hold
A prior1/2
A P(E | source)1/100
A joint mass1/200
A posterior5/21
B prior3/10
B P(E | source)1/50
B joint mass3/500
B posterior2/7
C prior1/5
C P(E | source)1/20
C joint mass1/100
C posterior10/21
Evidence: sum of joint masses21/1000

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

The hypotheses must genuinely form a partition for this direct sum. “Supplier A,” “component is large” and “component is imported” can overlap and leave gaps. Either use a coherent joint model of those properties or refine them into mutually exclusive exhaustive combinations. A missing “other source” category can also distort the result. The posterior is a distribution among the alternatives actually included, not proof that the list covers reality.

A hypothesis can receive a larger posterior share while still explaining less than half the evidence cases. A likelihood ratio compares relative compatibility; a posterior share depends on all weighted alternatives. Neither a large source posterior nor an association between source and flag establishes what physically caused a defect. The calculation identifies a conditional source distribution for a specified selection and inspection model.

04

Make the base rate visible in counts

Consider a hypothetical population with defect probability 1/50. Suppose the inspection flags a defective component with probability 9/10 and a nondefective component with probability 1/20. The first rate is sensitivity in this setting; the second is the false-positive rate among nondefects. The false-positive rate does not describe the proportion of flags that are false. Its denominator is the nondefective population.

A proportional cohort of 10,000 makes the joint masses easy to see. There are 200 defects, of which 180 are flagged and 20 are not. There are 9,800 nondefects, of which 490 are flagged and 9,310 are not. These are exact counts for a hypothetical cohort constructed in those proportions, or expected frequencies under a corresponding repeated sampling model. They are not a claim that every real sample of 10,000 has exactly those counts.

The evidence column contains 670 flags:180 from defects and 490 from nondefects. Therefore P(H|E)=180/670=18/67, approximately 0.2687. In probability form, the joint defect-and-flag mass is(1/50)(9/10)=9/500; the nondefect-and-flag mass is(49/50)(1/20)=49/1000. Their sum 67/1000 gives the same posterior 18/67.

W2 · Rare defects

Base rates and reversed conditionalsW2 · Rare defects. Prior P(H): 1/50. Forward P(E | H): 9/10. Joint P(H and E): 9/500. Evidence P(E): 67/1000. Reverse P(H | E): 18/67. All bars use a common zero-to-one probability axis; their denominators/targets differ. The bars are not parts of a single partition.Base rates and reversed conditionalsPrior P(H)1/50Forward P(E | H)9/10Joint P(H and E)9/500Evidence P(E)67/1000Reverse P(H | E)18/6701/41/23/41probability (dimensionless)
The forward and reverse conditionals have different reference populations. Joint and evidence probabilities refer to the full population.
Declared conditions and calculated quantities: W2 · Rare defects
Quantity or conditionExact result, labelled approximation or hold
Prior P(H)1/50
Forward P(E | H)9/10
Joint P(H and E)9/500
Evidence P(E)67/1000
Reverse P(H | E)18/67
Joint P(H complement and E)49/1000
False-flag likelihood P(E | H complement)1/20

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

The inspection flags 90% of defects, while only about 26.9% of flags are defects under this rare-defect prior. Both statements can be true because the nondefective group is much larger. Calling the inspection “90% accurate” would obscure which conditional rate is known and would omit its behavior on nondefects. Report the two conditional performance rates and the relevant population base rate separately.

An unflagged result also has a conditional interpretation. In the count table,20 defects and 9,310 nondefects are unflagged, so the defect proportion among unflagged components is 20/9,330=2/933. A negative or absent flag is its own evidence event; its likelihood ratio is formed from the complement rates, not automatically by taking the reciprocal of the positive-flag ratio. Always use the event actually observed.

05

The same inspection can give a different posterior

Keep the flag probabilities 9/10 for defects and 1/20 for nondefects, but change the defect prior to 1/5. The weighted flag masses become(1/5)(9/10)=9/50 and(4/5)(1/20)=1/25. Their sum is 11/50. The posterior defect probability after a flag is therefore(9/50)/(11/50)=9/11, approximately 0.8182. Nothing about the inspection’s stipulated conditional performance changed.

The difference from 18/67 comes from the reference population. At prior 1/5, defects are a much larger part of the original pool, so they contribute more of the flags. A posterior from one population should not be transferred to another by keeping only the instrument label. If the likelihoods also vary across settings, those changes must be modeled as well; the present comparison deliberately isolates the prior change.

For a general binary prior p with 0<p<1, and fixed likelihoods l₁=P(E|H), l₀=P(E|Hᶜ), the posterior is p l₁/[p l₁+(1−p)l₀] when the denominator is positive. This expression displays both ingredients. With l₁>0 and l₀>0, increasing p increases the posterior. A favorable likelihood ratio can produce a modest posterior when p is very small, and a posterior near one when p is large.

A discrete hypothesis assigned prior probability zero remains zero after a positive-evidence update within the same fixed model: its joint mass is zero. This is a reason to think carefully before assigning exact zero to an uncertain possibility. Revising a model or prior after learning that it omitted a realistic alternative is a distinct modeling step, not an ordinary update of the unchanged model. A continuous parameter singleton with zero prior mass requires the density distinctions introduced later and should not be confused with an excluded discrete hypothesis.

Prior sensitivity is therefore part of honest interpretation. Ask which priors represent plausible background information, whether they use evidence already counted in the likelihood, and whether the conclusion changes across that range. Showing sensitivity does not mean that any prior is equally justified. It makes the dependence of a model-based answer on its stated assumptions visible.

06

Relative evidence multiplies odds

For 0<p<1, odds in favor of H are O=p/(1−p). Conversely, p=O/(1+O). Odds compare the probability of H with that of its complement; they can exceed one and are not themselves probabilities. When both compared joint masses are positive, division of the two Bayes numerators gives posterior odds=[P(E|H)/P(E|Hᶜ)]×prior odds.

The ratio BF=P(E|H)/P(E|Hᶜ) is the Bayes factor for these specified competing hypothesis events and evidence. It is also a likelihood ratio in this simple comparison. BF>1 favors H relative to Hᶜ; BF<1 favors the alternative; BF=1 leaves their odds unchanged. A factor of six means a sixfold multiplication of odds, not a posterior probability of six or a sixfold multiplication of probability.

For example, prior probability 1/5 gives odds 1/4. Evidence with factor 6 changes the odds to 3/2, corresponding to probability 3/5. A further correctly conditional factor 1/3 changes those odds to 1/2, corresponding to probability 1/3. The second evidence weakens H relative to the state after the first update, yet the final probability remains above its original 1/5. Direction of evidence and final probability level are different ideas.

Handle boundary cases with joint masses. If the alternative’s evidence mass is zero while H has positive evidence mass, the posterior is one and the odds are infinite. If both evidence masses are zero, the evidence is null and no event update exists. Expressions such as zero prior odds times an infinite factor can conceal this undefined case. The direct weighted-mass calculation remains the reliable starting point.

For composite scientific models, a model’s evidence may require integrating over its uncertain parameters using its own proper prior. A Bayes factor then compares those integrated evidences, not whichever maximized likelihood happens to look best. Factors can depend strongly on parameter-prior choices. The simple event formula explains the logic; it does not license replacing a model comparison with an arbitrary ratio of fitted peaks.

Products of positive factors can be added on a logarithmic odds scale: log posterior odds=log prior odds+Σ log correctly conditional factors. This is useful when many small probabilities would be numerically awkward. It changes the representation, not the assumptions. A logarithm cannot repair double-counted evidence, an unjustified independence factorization or a model assigning zero probability to the observation.

W4 · Support then weaken

Odds and log-odds updatesW4 · Support then weaken. Stage 0: odds 1/4, probability 1/5, approximate natural log-odds -1.386294. Stage 1: odds 3/2, probability 3/5, approximate natural log-odds 0.4054651. Stage 2: odds 1/2, probability 1/3, approximate natural log-odds -0.6931472.Odds and log-odds updatesPrior: odds 1/4After evidence 1: odds 3/2After evidence 2: odds 1/2-1.88629400.9054651natural log-odds (numerical positions)
Multiplication of odds becomes addition of log-odds. Logarithms are labelled approximations; exact odds and probabilities remain in the table.
Declared conditions and calculated quantities: W4 · Support then weaken
Quantity or conditionExact result, labelled approximation or hold
Stage 0 odds1/4
Stage 0 probability1/5
Stage 0 ln odds (approx)-1.386294
Stage 1 odds3/2
Stage 1 probability3/5
Stage 1 ln odds (approx)0.4054651
Stage 2 odds1/2
Stage 2 probability1/3
Stage 2 ln odds (approx)-0.6931472
Conditional Bayes factor 16
Conditional Bayes factor 21/3

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

07

Use the likelihood appropriate to the evidence already seen

Let E₁ be observed first and E₂ second, with positive intermediate evidence probabilities. After E₁, its posterior becomes the prior for the next step. The second likelihood is P(E₂|H,E₁), where the comma means conditioning on H∩E₁. The two-observation joint weight is P(H)P(E₁|H)P(E₂|H,E₁). Use the corresponding history-conditioned expression under each alternative, then normalize across alternatives.

Take prior P(H)=1/4. The first-event likelihoods are 4/5 under H and 1/5 under Hᶜ, giving joint weights 1/5 and 3/20 and posterior 4/7. Now suppose the second-event probabilities, explicitly given the first event, are 3/5 under H and 2/5 under Hᶜ. The final joint weights are(1/5)(3/5)=3/25 and(3/20)(2/5)=3/50. Normalizing gives P(H|E₁∩E₂)=2/3.

The odds check is compact: prior odds 1/3, first factor 4, conditional second factor 3/2, final odds 2 and posterior 2/3. No standalone likelihood P(E₂|H) was supplied. Inventing one would change the model. If E₁ and E₂ are conditionally independent under each compared hypothesis, then P(E₂|H,E₁)=P(E₂|H) and the analogous equality holds under Hᶜ. Only then are the standalone likelihood factors justified.

W5 · Use the conditional second likelihood

Sequential evidence with its conditionsW5 · Use the conditional second likelihood. Prior P(H): 1/4. After first observation: 4/7. After both observations: 2/3. All bars use a common zero-to-one probability axis; their denominators/targets differ. Second rates are conditional on the first observation; no standalone independence is assumed.Sequential evidence with its conditionsPrior P(H)1/4After first observation4/7After both observations2/301/41/23/41probability (dimensionless)
Second rates are conditional on the first observation; no standalone independence is assumed.
Declared conditions and calculated quantities: W5 · Use the conditional second likelihood
Quantity or conditionExact result, labelled approximation or hold
Prior P(H)1/4
After first P(H | E1)4/7
P(E2 | H,E1)3/5
P(E2 | H complement,E1)2/5
P(E2 | E1)18/35
Both observations: joint evidence9/50
After both P(H | E1,E2)2/3
ConditionSecond rates are conditional on the first observation; no standalone independence is assumed.

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Sequence uses the chain rule and the declared second likelihoods conditional on E1; no marginal-independence assumption is substituted.

Marginal independence of the observations is not the required condition. A shared unknown hypothesis can make observations dependent after hypotheses are mixed, even if their generation is independent within every hypothesis. Conversely, knowing only an unconditional independence relation does not establish the within-hypothesis factorization needed by the update. Lesson 151’s distinction between mixed and conditional laws is essential here.

For a fixed joint model and the same final evidence intersection, conditioning in either order yields the same posterior whenever the necessary ratios are defined. Reverse-order likelihoods must come from that model; they cannot be guessed from forward factors. If the sampling rule, stopping rule, selection or model changes with the order, check what evidence was actually recorded. Apparent order effects can reflect a changed question or an inconsistent calculation.

08

A second record need not be a second observation

Return to the rare-defect inspection with prior 1/50 and flag likelihoods 9/10 and 1/20. After one flag, the posterior is 18/67. Suppose a second database field is literally copied from the first flag. Given the first flag, the copy is flagged with probability one under both defect states. Its conditional factor is 1/1=1, and the posterior remains 18/67. Repeating the stored statement adds no new information.

Now change the experiment: use two newly generated inspection outcomes that are conditionally independent given each defect state, both with the same stated rates. After two flags, the defect joint weight is(1/50)(9/10)²; the nondefect joint weight is(49/50)(1/20)². Their normalization gives 324/373, approximately 0.8686. This larger result belongs to the independent-inspections model, not to the copied-record model.

Real observations can lie between those extremes. Two instruments may share a power supply, calibration error or preprocessing step; two reports may repeat the same witness or underlying measurement. The correct second factor uses the conditional distribution given both the hypothesis and the first observation. A correlation label alone does not specify that distribution, and a convenient independence assumption needs a scientific justification.

W6 · Copy of the first flag

New evidence, shared noise and copied recordsW6 · Copy of the first flag. Prior P(H): 1/50. After first observation: 18/67. After both observations: 18/67. All bars use a common zero-to-one probability axis; their denominators/targets differ. The second record is a perfect copy. Given the first flag, its probability is one under both hypotheses; it adds no evidence.New evidence, shared noise and copied recordsPrior P(H)1/50After first observation18/67After both observations18/6701/41/23/41probability (dimensionless)
The second record is a perfect copy. Given the first flag, its probability is one under both hypotheses; it adds no evidence.
Declared conditions and calculated quantities: W6 · Copy of the first flag
Quantity or conditionExact result, labelled approximation or hold
Prior P(H)1/50
After first P(H | E1)18/67
P(E2 | H,E1)1
P(E2 | H complement,E1)1
P(E2 | E1)1
Both observations: joint evidence67/1000
After both P(H | E1,E2)18/67
ConditionThe second record is a perfect copy. Given the first flag, its probability is one under both hypotheses; it adds no evidence.

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Sequence uses the chain rule and the declared second likelihoods conditional on E1; no marginal-independence assumption is substituted.

Evidence can also be counted twice by constructing a prior from a dataset and then treating that same dataset as new likelihood evidence without a coherent joint model. A prior can legitimately incorporate earlier information, but the update must use genuinely additional information or explicitly model the dependence and overlap. Keep a record of which observations contribute to which step of the analysis.

The remedy is not to discard repeated information indiscriminately. A fresh measurement can contain useful evidence even when dependent on previous measurements, provided its history-conditioned likelihood is modeled. The goal is to count the information according to its generating process. Exact copies are an especially clear check because their correct conditional Bayes factor is exactly one.

09

Selection belongs in the evidence model

Let H be defect and S selection for further inspection. Suppose the population prior is P(H)=1/10, while selection probabilities are P(S|H)=4/5 and P(S|Hᶜ)=1/5. The selected defect mass is 2/25 and selected nondefect mass 9/50. Hence P(S)=13/50 and P(H|S)=4/13. Selection has already changed the reference population before the inspection result is used.

Now stipulate that, given each defect state, selection and inspection are independent. The flag likelihoods are 9/10 for defects and 1/10 for nondefects. The selected-and-flagged defect mass is(1/10)(4/5)(9/10)=9/125. Its nondefect counterpart is(9/10)(1/5)(1/10)=9/500. Normalizing these two masses gives P(H|S∩E)=4/5. Equivalently, start with the selected prior 4/13 and apply the selected-population likelihoods justified by the conditional independence assumption.

Ignoring selection and using the original prior with the same inspection rates would give(1/10)(9/10)/[(1/10)(9/10)+(9/10)(1/10)]=1/2. That is P(H|E) under the unselected population model. It is not the desired selected-and-flagged probability 4/5. The discrepancy comes from conditioning on different information, rather than from a failure of Bayes’s rule.

W7 · Selection before inspection

Condition on the sampling procedureW7 · Selection before inspection. Population prior: 1/10. Selected prior P(H | S): 4/13. Selected and flagged P(H | S,E): 4/5. All bars use a common zero-to-one probability axis; their denominators/targets differ. Inspection rates are explicitly conditional on selection.Condition on the sampling procedurePopulation prior1/10Selected prior P(H | S)4/13Selected and flagged P(H | S,E)4/501/41/23/41probability (dimensionless)
The inspection rates condition on S and the defect state. The selected prior must match that reference population.
Declared conditions and calculated quantities: W7 · Selection before inspection
Quantity or conditionExact result, labelled approximation or hold
Unselected prior P(H)1/10
P(S | H)4/5
P(S | H complement)1/5
Selection probability P(S)13/50
Selected prior P(H | S)4/13
P(E | H,S)9/10
P(E | H complement,S)1/10
Full-population P(S and E)9/100
P(H | S,E)4/5

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

The stipulated conditional independence is not automatic. If selection depends on another measurement that shares inspection noise, the appropriate likelihood is P(E|H,S), and it may differ from P(E|H). Conversely, some selection procedures can be ignorable for a particular inferential question under stated assumptions. There is no universal instruction to multiply by every selection probability or to ignore all selection. Begin with the joint model and identify what was actually observed.

In observational studies and case-control sampling, the composition of the retained sample can be deliberately different from the population composition. A sample’s fraction of cases is not automatically a population prevalence. Recovering a target-population posterior can require sampling information and transport assumptions. The elementary example shows the bookkeeping: identify selection, compute or justify the conditional likelihoods, and use the prior for the actual information state.

10

Fix the observed data, then compare parameter values

A parameter θ indexes possible data-generating laws. For example, θ can be a coin’s probability of H. Given θ, a model supplies probabilities for possible toss records. Once a record d is observed, the likelihood L(θ)=p(d|θ) views that same expression as a function of θ. The probability law is normalized over possible data for each fixed θ. The likelihood need not sum or integrate to one over θ, and it is not a posterior distribution by itself.

Suppose a coin is one of two types, θ=1/4 or θ=3/4, with equal prior probabilities. Conditional on its type, tosses are independent. For the ordered record HHT, the likelihood is θ²(1−θ), with values 3/64 and 9/64. Their equal-prior joint weights are 3/128 and 9/128; the evidence probability is 3/32. The posterior type probabilities are 1/4 and 3/4. The likelihood values did not need to sum to one over the two types.

W8 · The ordered record HHT

A likelihood is a function of the parameterW8 · The ordered record HHT. Likelihood at theta = 1/4: 3/64. Likelihood at theta = 3/4: 9/64. All bars use a common zero-to-one probability axis; their denominators/targets differ. Likelihood values across parameters need not total one.A likelihood is a function of the parameterLikelihood at theta = 1/43/64Likelihood at theta = 3/49/6401/41/23/41probability (dimensionless)
The data are fixed while theta varies. A fixed-count coefficient cancels from posterior normalisation but remains in the evidence.
Declared conditions and calculated quantities: W8 · The ordered record HHT
Quantity or conditionExact result, labelled approximation or hold
Hypothesis theta1/4
Likelihood of observed order3/64
Posterior type probability1/4
Hypothesis theta3/4
Likelihood of observed order9/64
Posterior type probability3/4
Count coefficient1
Evidence for this observed event3/32

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

If only the count “two H in three tosses” is recorded, there are three compatible orders. The count likelihood is 3θ²(1−θ), with values 9/64 and 27/64, and evidence 9/32. The factor 3 cancels from posterior normalization because it is the same for both types. The posterior remains 1/4,3/4. However, the probability of the observed count event is three times the probability of the particular ordered record; the evidences are not interchangeable.

Writing a posterior as proportional to likelihood times prior omits a normalizing constant, not a scientific assumption. A factor independent of θ can be dropped when calculating the posterior shape within that model. It must be restored when calculating the evidence or the probability of the data. In comparisons between models, check whether a supposedly canceling factor is common to all models and whether the same data event is being compared.

A likelihood also depends on the observation and stopping procedure represented in the model. An ordered sequence, a fixed-sample count, a selected sample and a record stopped after an event can have different data spaces. Sometimes their likelihoods are proportional for the parameter question at hand, and sometimes they are not. State the procedure first, then derive the likelihood rather than selecting a convenient formula from the visible counts alone.

11

Optional extension: posterior density and interval probability

The remaining extensions introduce their notation locally; the finite-event route above does not depend on them. Let an unknown pass probability θ range over(0,1). A prior density π(θ) assigns probability to an interval by integration: P(a<θ<b)=∫ₐᵇπ(θ)dθ. The density is nonnegative and integrates to one. Its value at a point is a height, not that point’s probability. A continuous parameter can have zero probability at every exact value while intervals have positive probabilities.

A generative model specifies the data law for each θ. For fixed observed data d, write L(θ)=p(d|θ). This notation describes the supplied conditional model; it need not be an event-ratio conditional on a positive-mass singleton θ. If Z=∫L(θ)π(θ)dθ is finite and positive, a posterior-density version is π(θ|d)=L(θ)π(θ)/Z. Interval posterior probabilities are integrals of this normalized density.

For a uniform prior π(θ)=1 on(0,1) and one observed pass, the binary-trial likelihood is L(θ)=θ. The evidence probability is∫₀¹θ dθ=1/2, so the posterior density is 2θ. Its probability above 3/4 is∫_{3/4}¹2θ dθ=1−(3/4)²=7/16. The probability of θ exactly 3/4 is zero, although the displayed density there is 3/2. Changing a density’s value at a single point does not change interval probabilities.

W9 · One pass and a uniform prior

Density height and interval probabilityW9 · One pass and a uniform prior. Prior density, Posterior density density curves sampled on [0, 1]. The horizontal axis is parameter theta (pass probability); vertical axis is density per theta unit. Full analytical normalisation is separate from the finite drawing window. The shaded posterior area above theta=3/4 has exact probability 7/16. The orange height is density 3/2; the point probability is zero.Density height and interval probability00.250.50.75101.082.16Prior densityPosterior densityparameter theta (pass probability)Vertical: density per theta unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
The shaded posterior area is interval probability; the orange marker is density height. Proper densities integrate to one analytically; finite samples only approximate their shape.
Declared conditions and calculated quantities: W9 · One pass and a uniform prior
Quantity or conditionExact result, labelled approximation or hold
Proper priorBeta(1,1)
Passes / failures1 / 0
Observed data kindSpecified ordered sequence
Count coefficient1
PosteriorBeta(2,1)
B(A,B)1/2
Posterior density constant2
Evidence for the declared event1/2
Next-pass predictive probability2/3
P(theta > 3/4 | data)7/16
Density at theta = 3/43/2
P(theta = 3/4 | data)0
Full prior / posterior integrals1 / 1 (analytical)
Drawing trapezoid areas (approx)1 / 1

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Binary trials and the next trial are independent conditional on one fixed theta. Beta notation, density integration and the fixed-n count model are optional definitions supplied locally.

When the observed data are themselves continuous, L(θ) can be a density in the data rather than a probability of a discrete event. Then Z is the corresponding marginal data density at the observation, not the point probability P(D=d). Use a suitable version at data values with positive finite marginal density, with the almost-everywhere qualifications from lesson 151. Do not insert a zero point probability into elementary event Bayes.

Units provide a useful check. A prior and posterior density have reciprocal parameter units; a continuous-data likelihood and its evidence density have reciprocal data units. The ratio leaves the posterior with the correct parameter-density units. Density heights may exceed one. In contrast, the discrete pass likelihood θ and its evidence 1/2 are dimensionless probabilities. Keeping these roles explicit prevents density values from being mistaken for event probabilities.

12

Proportionality needs a finite positive integral

The notation π(θ|d)∝L(θ)π(θ) is a useful intermediate step only when the nonnegative product can be normalized. A zero integral supplies no posterior mass. An infinite integral cannot be turned into a probability density by division. A finite positive integral supplies the required normalizing constant. Checking the range, integrability and support is part of the calculation, not a cosmetic step after drawing a plausible curve.

A proper prior is a probability distribution. An improper prior kernel has infinite total mass and is not a probability distribution, even when a later product can be normalized. Such kernels occur in advanced methods, but they require separate justification and explicit posterior-propriety checks. The proper-prior examples in this lesson supply ordinary probabilities for the parameter and data before updating; an improper kernel does not supply those same quantities.

For example, k(θ)=1/[θ(1−θ)] on(0,1) is improper because its integral diverges at the endpoints. One pass and one failure have ordered likelihood θ(1−θ). Multiplying gives a constant kernel, which can be normalized to the uniform posterior density. Two passes and no failures instead give the kernel θ/(1−θ), whose integral diverges near 1; an antiderivative is−θ−log(1−θ). There is no normalized posterior in that case.

The successful first normalization does not retroactively make k a probability prior. Multiplying k by any positive constant leaves that posterior unchanged but changes the purported evidence by the same constant. There is therefore no ordinary prior-predictive probability or standard evidence-based model comparison from this unspecified improper scale. A proper posterior and a well-defined marginal likelihood are different requirements.

In computation, a finite plotting interval or a numerical integration cutoff can conceal a divergent tail or endpoint. Investigate the analytic behavior before trusting a finite displayed area. If a proper truncation is intended, declare it as a different prior and check sensitivity to the truncation. Do not silently replace an improper model by a numerical approximation and report its output as if the original probability model had been valid.

13

Optional extension: derive an updating family

Define the beta density for a,b>0 by π(θ)=θ^{a−1}(1−θ)^{b−1}/B(a,b) on 0<θ<1, where B(a,b)=∫₀¹t^{a−1}(1−t)^{b−1}dt. The positive shape parameters make this integral finite. This definition is enough for the update below; the general study of distribution families comes later. For positive integer parameters, repeated integration by parts gives B(a,b)=(a−1)!(b−1)!/(a+b−1)!. Noninteger parameters use the integral definition here.

Suppose a pass/fail trial succeeds with probability θ and trials are independent conditional on θ. A specified ordered record with s passes and f failures has likelihood θˢ(1−θ)ᶠ. Multiplying by the beta prior adds exponents, producing a kernel θ^{a+s−1}(1−θ)^{b+f−1}. Normalization identifies the posterior as Beta(a+s,b+f). This closure under the stated likelihood is called conjugacy. It is a consequence of the algebra, not a guarantee that a beta prior fits every scientific setting.

Take prior Beta(2,3). Its density is 12θ(1−θ)². For four passes and one failure in a specified order, the product is 12θ⁵(1−θ)³. Since B(6,4)=1/504, the evidence probability is 12/504=1/42, and the posterior density is 504θ⁵(1−θ)³, namely Beta(6,4). All prior and posterior shape parameters are positive, so these are proper distributions.

W10 · A specified five-trial order

Proper beta and fixed-trial count modelsW10 · A specified five-trial order. Prior density, Posterior density density curves sampled on [0, 1]. The horizontal axis is parameter theta (pass probability); vertical axis is density per theta unit. Full analytical normalisation is separate from the finite drawing window. The shaded posterior area above theta=1/2 has exact probability 191/256. The orange height is density 63/32; the point probability is zero.Proper beta and fixed-trial count models00.250.50.75101.3687312.737463Prior densityPosterior densityparameter theta (pass probability)Vertical: density per theta unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
The shaded posterior area is interval probability; the orange marker is density height. Proper densities integrate to one analytically; finite samples only approximate their shape.
Declared conditions and calculated quantities: W10 · A specified five-trial order
Quantity or conditionExact result, labelled approximation or hold
Proper priorBeta(2,3)
Passes / failures4 / 1
Observed data kindSpecified ordered sequence
Count coefficient1
PosteriorBeta(6,4)
B(A,B)1/504
Posterior density constant504
Evidence for the declared event1/42
Next-pass predictive probability3/5
P(theta > 1/2 | data)191/256
Density at theta = 1/263/32
P(theta = 1/2 | data)0
Full prior / posterior integrals1 / 1 (analytical)
Drawing trapezoid areas (approx)0.9999826 / 1

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Binary trials and the next trial are independent conditional on one fixed theta. Beta notation, density integration and the fixed-n count model are optional definitions supplied locally.

If the observation is instead the fixed-five-trial count of four passes, its likelihood includes the five possible positions for the failure:5θ⁴(1−θ). The evidence becomes 5/42, while the posterior remains Beta(6,4). The count factor cancels from posterior shape but not from the data probability. This is the continuous-parameter counterpart of the two-coin-type example.

The likelihood assumes a shared θ and conditional independence across the trials. A changing pass probability, serial dependence, unequal trial conditions or selective recording can require another model. Conjugate formulas cannot make those assumptions true. Likewise, a,b represent a chosen prior shape and concentration; they are not automatically counts from an actual earlier experiment. Their justification should match the available background information.

14

A parameter distribution is not a prediction of one outcome

After observing data, the posterior describes uncertainty about θ. Predicting a fresh pass requires a further model: given θ, the future trial succeeds with probability θ and is independent of the observed trials. Its posterior-predictive success probability is∫₀¹θπ(θ|d)dθ. This average weighs each possible success probability by its posterior support. It is not the probability that θ equals the resulting average.

For the Beta(a+s,b+f) posterior, the predictive integral is B(a+s+1,b+f)/B(a+s,b+f)=(a+s)/(a+b+s+f). In the Beta(2,3) example with four passes and one failure, the posterior Beta(6,4) predicts a next-pass probability 6/10=3/5. The continuous posterior assigns zero mass to the singleton θ=3/5. A next pass is a binary outcome; an interval of parameter values is a different event.

A credible set C is a parameter set chosen so its posterior probability∫_Cπ(θ|d)dθ has a stated value, such as 0.9. It summarizes parameter uncertainty under the model and data. A predictive interval or event instead concerns a future observation and integrates its conditional law over the posterior. The two need not have the same spread or interpretation. Naming the target prevents a narrow parameter interval from being mistaken for a narrow range of future outcomes.

Compare three priors for the same four passes and one failure. Beta(1,1) becomes Beta(5,2), predicting 5/7. Beta(2,3) becomes Beta(6,4), predicting 3/5. Beta(20,30) becomes Beta(24,31), predicting 24/55. The last prior has substantially greater concentration around its prior-supported region and retains more influence after only five trials. The comparison shows sensitivity; it does not establish which prior is scientifically appropriate.

Four passes and one failure · Uniform prior

The same data under different proper priorsFour passes and one failure · Uniform prior. Prior density, Posterior density density curves sampled on [0, 1]. The horizontal axis is parameter theta (pass probability); vertical axis is density per theta unit. Full analytical normalisation is separate from the finite drawing window. The shaded posterior area above theta=1/2 has exact probability 57/64. The orange height is density 15/16; the point probability is zero.The same data under different proper priors00.250.50.75101.3271042.654208Prior densityPosterior densityparameter theta (pass probability)Vertical: density per theta unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
The shaded posterior area is interval probability; the orange marker is density height. Proper densities integrate to one analytically; finite samples only approximate their shape.
Declared conditions and calculated quantities: Four passes and one failure · Uniform prior
Quantity or conditionExact result, labelled approximation or hold
Proper priorBeta(1,1)
Passes / failures4 / 1
Observed data kindFixed-n count
Count coefficient5
PosteriorBeta(5,2)
B(A,B)1/30
Posterior density constant30
Evidence for the declared event1/6
Next-pass predictive probability5/7
P(theta > 1/2 | data)57/64
Density at theta = 1/215/16
P(theta = 1/2 | data)0
Full prior / posterior integrals1 / 1 (analytical)
Drawing trapezoid areas (approx)1 / 0.9999566

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Binary trials and the next trial are independent conditional on one fixed theta. Beta notation, density integration and the fixed-n count model are optional definitions supplied locally.

The familiar add-one prediction(s+1)/(s+f+2) is the special Beta(1,1) calculation under this conditional-trial model. It is not a universal correction for all datasets, priors or impossible events. A prior should be selected and checked for its meaning, not chosen solely because its formula avoids zero. Prior-predictive simulation or calculation can reveal whether it places substantial probability on scientifically implausible records.

More data can make a likelihood informative relative to many reasonable priors, but that statement depends on the model and parameter identifiability. Misspecified likelihoods, nonidentified directions or persistent selection can preserve important sensitivity. Report what changed across plausible assumptions and which observations would help distinguish them, rather than assuming that a large sample automatically removes every modeling choice.

15

Optional extension: complete a square for a noisy measurement

Define N(m,v), with v>0, as the density(2πv)^{−1/2}exp[−(z−m)²/(2 v)] for real z. Here m is its center and v its variance, or squared spread; the standard deviation is√v. The density integrates to one. Variance and standard deviation have different units, so the second argument in this notation is explicitly a variance. The later moments and distribution lessons develop these quantities systematically.

Let an unknown sensor level θ have prior N(10,4). One observed reading x=12 has conditional distribution N(θ,9), with known noise variance 9. The prior-times-likelihood exponent is−1/2 times[(θ−10)²/4+(12−θ)²/9]. Completing the square gives(13/36)(θ−138/13)²+4/13. The last term does not depend on θ and is absorbed by normalization. Thus the parameter posterior is N(138/13,36/13).

The posterior center 138/13≈10.6154 lies between the prior center 10 and reading 12. The precision, defined here as reciprocal variance, is 1/4+1/9=13/36. For a prior N(m₀,τ²) and n conditionally independent readings with known common noise varianceσ²>0, completing the same square gives precision A=1/τ²+n/σ² and center[m₀/τ²+Σⱼxⱼ/σ²]/A. The posterior variance is 1/A. The original prior also requiresτ²>0; a zero-variance point mass is a different model.

A fresh reading retains observation noise even after the parameter has been updated. If it has conditional law N(θ,9) and is independent of the old reading given θ, its predictive density is the integral of that likelihood against the parameter posterior. Writing m=138/13 and v=36/13, the integrand’s exponent involves(y−θ)²/9+(θ−m)²/v. Complete its square in θ: A*(θ−c)²+(y−m)²/(9+v), where A*=1/9+1/v and c=(y/9+m/v)/A*.

Integrating the square term contributes√(2π/A*). Combined with the two original normalizing constants, this leaves the normal density N(m,9+v). The next-reading prediction is therefore N(138/13,153/13). Its variance is larger than the parameter posterior variance 36/13 because a new physical measurement still contains noise. This derivation uses the density integral directly; it does not assume a later variance-addition theorem.

W12 · One noisy reading

Parameter and predictive uncertaintyW12 · One noisy reading. Prior, parameter posterior and next-reading predictive densities share an absolute sensor-unit x axis on [-3.1071403821402, 24.337909612909]. All 240 panel intervals resolve the narrowest standard deviation by at least eight intervals. The vertical axis is density per sensor unit. Normal tails continue outside the finite window; no density is renormalised to that window.Parameter and predictive uncertainty≈-3.11≈3.75≈10.6≈17.5≈24.30≈0.129≈0.259PriorParameter posteriorNext readingsensor reading / level (sensor units)Vertical: density per sensor unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
Completing the square adds precisions. The next reading also includes fresh noise; its predictive spread is wider than parameter uncertainty.
Declared conditions and calculated quantities: W12 · One noisy reading
Quantity or conditionExact result, labelled approximation or hold
Prior mean (sensor units)10
Prior variance (sensor units squared)4
Known noise variance9
Readings12
Prior precision (inverse squared units)1/4
Data precision1/9
Posterior precision13/36
Posterior mean138/13
Posterior parameter variance36/13
Next-reading predictive variance153/13
Density displayOne shared absolute sensor-unit axis
Full density integrals1 / 1 / 1 (analytical)
Finite-window areas (approx)1 / 1 / 0.9999366
Prior displayed axis (approx)absolute; centre 10; range -3.1071403821401624 to 24.33790961290939
Parameter posterior displayed axis (approx)absolute; centre 10.615384615384613; range -3.1071403821401624 to 24.33790961290939
Next reading displayed axis (approx)absolute; centre 10.615384615384613; range -3.1071403821401624 to 24.33790961290939

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. N(m,v) uses variance v, not standard deviation. Noise variance is known and positive; readings and the next reading are independent conditional on theta. Full normal densities integrate to one analytically. Finite displayed windows omit tails and are never renormalised.

If the sensor unit is u, centers and readings have units u, variances have u², precisions have 1/u², and densities have 1/u. Known independent normal noise and a normal prior are substantive assumptions. Heavy-tailed noise, shared calibration error, saturation or a changing level can require another observation model. Completing the square solves the stated problem; it does not validate the instrument or its noise law.

16

Check the model as well as the arithmetic

A Bayesian calculation can be internally correct and scientifically inadequate. Check that alternatives cover the question, priors match existing information, likelihoods represent sampling and measurement, and dependencies and selection have been modeled. Inspect sensitivity to plausible alternatives. A posterior should not be used as a certificate that the assumptions generating it are true.

Prior-predictive checks ask what data the model expects before fitting the current observations. Posterior-predictive checks generate or calculate new data through the fitted posterior and compare relevant features with the observed record: counts, variation, tails, patterns or other scientifically meaningful summaries. A mismatch can reveal a problem worth investigating. A successful check on a few summaries does not prove every part of the model correct, and reusing data in fitting and checking changes the interpretation of a tail-area diagnostic.

Calibration names a repeated experiment and a target. Under repeated joint draws of a parameter from the stated prior and data from its likelihood, a posterior set with probability q for almost every dataset has joint-model coverage q. Integrate its conditional inclusion probability q over the data distribution to obtain q. This is not a guarantee of q coverage at every fixed parameter value, nor a validation of the model’s fit to reality. Those are different questions.

Empirical probability calibration asks whether comparable cases assigned a probability p show the event at approximately that frequency, allowing for sampling uncertainty and the evaluation procedure. Held-out checks can be informative, but a single aggregate match can hide subgroup failures or uninformative forecasts. Computational simulation-based calibration checks a different link: whether an inference implementation recovers the posterior behavior expected under simulated draws from its own joint model. Neither kind of check replaces scrutiny of the scientific assumptions.

Forecast record · Matching group proportions

Calibration checks on a finite forecast recordForecast record · Matching group proportions. Forecast 1/5; 4 successes in 20, observed fraction 1/5, difference 0. Forecast 1/2; 10 successes in 20, observed fraction 1/2, difference 0. Forecast 4/5; 16 successes in 20, observed fraction 4/5, difference 0. This finite record is a diagnostic, not a proof of future calibration.Calibration checks on a finite forecast record000.50.5114/2010/2016/20Declared forecast probability (dimensionless)Vertical: observed fraction within each finite groupDashed diagonal: equality; markers are finite record proportions
Observed group fractions test the forecast record on its stated scale. Small groups are coarse and uncertain; a matching finite record proves no universal calibration.
Declared conditions and calculated quantities: Forecast record · Matching group proportions
Quantity or conditionExact result, labelled approximation or hold
Group 1 forecast1/5
Group 1 observed successes / size4 / 20
Group 1 observed fraction1/5
Group 1 observed minus forecast0
Group 2 forecast1/2
Group 2 observed successes / size10 / 20
Group 2 observed fraction1/2
Group 2 observed minus forecast0
Group 3 forecast4/5
Group 3 observed successes / size16 / 20
Group 3 observed fraction4/5
Group 3 observed minus forecast0
Coverage experimentJoint prior-and-data draws differ from repeated data at one fixed parameter.
Model sensitivityInspect prior assumptions, sampling, dependence and plausible alternative likelihoods.
Causal limitConditioning on an alarm does not identify the effect of forcing that alarm.

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Model-based posterior coverage averages over the declared prior-and-data experiment. It is not an automatic fixed-parameter coverage guarantee. SBC checks inference computation under a model, not the model’s real-world truth.

Finally, conditioning is not intervention. A high posterior defect probability after an alarm does not show that forcing the alarm on would cause defects. The alarm can be evidence about an existing state without producing it. Causal conclusions need an appropriate design or causal model and assumptions about what changes under intervention. Updating uncertainty and changing the physical system are separate operations.

The reusable pattern is simple enough to retain through the advanced examples: declare the population and alternatives, build compatible data likelihoods, multiply by prior weights, normalize only when justified, and inspect the resulting predictions and sensitivity. The following lessons formalize numerical random variables, moments and common distributions. They provide richer tools for these models while preserving the same need to state information, dependence and scientific limits.

Explore Bayes’s rule and updating assumptions

Choose a stipulated case. Exact fractions, conditional likelihoods and held models remain visible. Density curves and logarithm positions use labelled numerical approximations. Optional density and normal examples define their assumptions in the lesson.

Sources, joint mass and posterior shares

W1 · Three suppliers

Sources, joint mass and posterior sharesW1 · Three suppliers. A: prior 1/2, conditional flag rate 1/100, posterior 5/21. B: prior 3/10, conditional flag rate 1/50, posterior 2/7. C: prior 1/5, conditional flag rate 1/20, posterior 10/21. In the upper mosaic the green area is joint mass; the lower bar renormalises those joint masses by the evidence.Sources, joint mass and posterior sharesColumn width = prior; green height = P(E | source)A1/2B3/10C1/510Posterior shares within the evidence populationA: 5/21B: 2/7C: 10/2101/41/23/41cumulative population share / posterior share
Prior column width times conditional height encodes joint area; posterior shares divide those areas by the evidence.
Declared conditions and calculated quantities: W1 · Three suppliers
Quantity or conditionExact result, labelled approximation or hold
A prior1/2
A P(E | source)1/100
A joint mass1/200
A posterior5/21
B prior3/10
B P(E | source)1/50
B joint mass3/500
B posterior2/7
C prior1/5
C P(E | source)1/20
C joint mass1/100
C posterior10/21
Evidence: sum of joint masses21/1000

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

Base rates and reversed conditionals

W2 · Rare defects

Base rates and reversed conditionalsW2 · Rare defects. Prior P(H): 1/50. Forward P(E | H): 9/10. Joint P(H and E): 9/500. Evidence P(E): 67/1000. Reverse P(H | E): 18/67. All bars use a common zero-to-one probability axis; their denominators/targets differ. The bars are not parts of a single partition.Base rates and reversed conditionalsPrior P(H)1/50Forward P(E | H)9/10Joint P(H and E)9/500Evidence P(E)67/1000Reverse P(H | E)18/6701/41/23/41probability (dimensionless)
The forward and reverse conditionals have different reference populations. Joint and evidence probabilities refer to the full population.
Declared conditions and calculated quantities: W2 · Rare defects
Quantity or conditionExact result, labelled approximation or hold
Prior P(H)1/50
Forward P(E | H)9/10
Joint P(H and E)9/500
Evidence P(E)67/1000
Reverse P(H | E)18/67
Joint P(H complement and E)49/1000
False-flag likelihood P(E | H complement)1/20

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

Odds and log-odds updates

W4 · Support then weaken

Odds and log-odds updatesW4 · Support then weaken. Stage 0: odds 1/4, probability 1/5, approximate natural log-odds -1.386294. Stage 1: odds 3/2, probability 3/5, approximate natural log-odds 0.4054651. Stage 2: odds 1/2, probability 1/3, approximate natural log-odds -0.6931472.Odds and log-odds updatesPrior: odds 1/4After evidence 1: odds 3/2After evidence 2: odds 1/2-1.88629400.9054651natural log-odds (numerical positions)
Multiplication of odds becomes addition of log-odds. Logarithms are labelled approximations; exact odds and probabilities remain in the table.
Declared conditions and calculated quantities: W4 · Support then weaken
Quantity or conditionExact result, labelled approximation or hold
Stage 0 odds1/4
Stage 0 probability1/5
Stage 0 ln odds (approx)-1.386294
Stage 1 odds3/2
Stage 1 probability3/5
Stage 1 ln odds (approx)0.4054651
Stage 2 odds1/2
Stage 2 probability1/3
Stage 2 ln odds (approx)-0.6931472
Conditional Bayes factor 16
Conditional Bayes factor 21/3

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

Sequential evidence with its conditions

W5 · Use the conditional second likelihood

Sequential evidence with its conditionsW5 · Use the conditional second likelihood. Prior P(H): 1/4. After first observation: 4/7. After both observations: 2/3. All bars use a common zero-to-one probability axis; their denominators/targets differ. Second rates are conditional on the first observation; no standalone independence is assumed.Sequential evidence with its conditionsPrior P(H)1/4After first observation4/7After both observations2/301/41/23/41probability (dimensionless)
Second rates are conditional on the first observation; no standalone independence is assumed.
Declared conditions and calculated quantities: W5 · Use the conditional second likelihood
Quantity or conditionExact result, labelled approximation or hold
Prior P(H)1/4
After first P(H | E1)4/7
P(E2 | H,E1)3/5
P(E2 | H complement,E1)2/5
P(E2 | E1)18/35
Both observations: joint evidence9/50
After both P(H | E1,E2)2/3
ConditionSecond rates are conditional on the first observation; no standalone independence is assumed.

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Sequence uses the chain rule and the declared second likelihoods conditional on E1; no marginal-independence assumption is substituted.

New evidence, shared noise and copied records

W6 · Copy of the first flag

New evidence, shared noise and copied recordsW6 · Copy of the first flag. Prior P(H): 1/50. After first observation: 18/67. After both observations: 18/67. All bars use a common zero-to-one probability axis; their denominators/targets differ. The second record is a perfect copy. Given the first flag, its probability is one under both hypotheses; it adds no evidence.New evidence, shared noise and copied recordsPrior P(H)1/50After first observation18/67After both observations18/6701/41/23/41probability (dimensionless)
The second record is a perfect copy. Given the first flag, its probability is one under both hypotheses; it adds no evidence.
Declared conditions and calculated quantities: W6 · Copy of the first flag
Quantity or conditionExact result, labelled approximation or hold
Prior P(H)1/50
After first P(H | E1)18/67
P(E2 | H,E1)1
P(E2 | H complement,E1)1
P(E2 | E1)1
Both observations: joint evidence67/1000
After both P(H | E1,E2)18/67
ConditionThe second record is a perfect copy. Given the first flag, its probability is one under both hypotheses; it adds no evidence.

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Sequence uses the chain rule and the declared second likelihoods conditional on E1; no marginal-independence assumption is substituted.

Condition on the sampling procedure

W7 · Selection before inspection

Condition on the sampling procedureW7 · Selection before inspection. Population prior: 1/10. Selected prior P(H | S): 4/13. Selected and flagged P(H | S,E): 4/5. All bars use a common zero-to-one probability axis; their denominators/targets differ. Inspection rates are explicitly conditional on selection.Condition on the sampling procedurePopulation prior1/10Selected prior P(H | S)4/13Selected and flagged P(H | S,E)4/501/41/23/41probability (dimensionless)
The inspection rates condition on S and the defect state. The selected prior must match that reference population.
Declared conditions and calculated quantities: W7 · Selection before inspection
Quantity or conditionExact result, labelled approximation or hold
Unselected prior P(H)1/10
P(S | H)4/5
P(S | H complement)1/5
Selection probability P(S)13/50
Selected prior P(H | S)4/13
P(E | H,S)9/10
P(E | H complement,S)1/10
Full-population P(S and E)9/100
P(H | S,E)4/5

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

A likelihood is a function of the parameter

W8 · The ordered record HHT

A likelihood is a function of the parameterW8 · The ordered record HHT. Likelihood at theta = 1/4: 3/64. Likelihood at theta = 3/4: 9/64. All bars use a common zero-to-one probability axis; their denominators/targets differ. Likelihood values across parameters need not total one.A likelihood is a function of the parameterLikelihood at theta = 1/43/64Likelihood at theta = 3/49/6401/41/23/41probability (dimensionless)
The data are fixed while theta varies. A fixed-count coefficient cancels from posterior normalisation but remains in the evidence.
Declared conditions and calculated quantities: W8 · The ordered record HHT
Quantity or conditionExact result, labelled approximation or hold
Hypothesis theta1/4
Likelihood of observed order3/64
Posterior type probability1/4
Hypothesis theta3/4
Likelihood of observed order9/64
Posterior type probability3/4
Count coefficient1
Evidence for this observed event3/32

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect.

Density height and interval probability

W9 · One pass and a uniform prior

Density height and interval probabilityW9 · One pass and a uniform prior. Prior density, Posterior density density curves sampled on [0, 1]. The horizontal axis is parameter theta (pass probability); vertical axis is density per theta unit. Full analytical normalisation is separate from the finite drawing window. The shaded posterior area above theta=3/4 has exact probability 7/16. The orange height is density 3/2; the point probability is zero.Density height and interval probability00.250.50.75101.082.16Prior densityPosterior densityparameter theta (pass probability)Vertical: density per theta unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
The shaded posterior area is interval probability; the orange marker is density height. Proper densities integrate to one analytically; finite samples only approximate their shape.
Declared conditions and calculated quantities: W9 · One pass and a uniform prior
Quantity or conditionExact result, labelled approximation or hold
Proper priorBeta(1,1)
Passes / failures1 / 0
Observed data kindSpecified ordered sequence
Count coefficient1
PosteriorBeta(2,1)
B(A,B)1/2
Posterior density constant2
Evidence for the declared event1/2
Next-pass predictive probability2/3
P(theta > 3/4 | data)7/16
Density at theta = 3/43/2
P(theta = 3/4 | data)0
Full prior / posterior integrals1 / 1 (analytical)
Drawing trapezoid areas (approx)1 / 1

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Binary trials and the next trial are independent conditional on one fixed theta. Beta notation, density integration and the fixed-n count model are optional definitions supplied locally.

Proper beta and fixed-trial count models

W10 · A specified five-trial order

Proper beta and fixed-trial count modelsW10 · A specified five-trial order. Prior density, Posterior density density curves sampled on [0, 1]. The horizontal axis is parameter theta (pass probability); vertical axis is density per theta unit. Full analytical normalisation is separate from the finite drawing window. The shaded posterior area above theta=1/2 has exact probability 191/256. The orange height is density 63/32; the point probability is zero.Proper beta and fixed-trial count models00.250.50.75101.3687312.737463Prior densityPosterior densityparameter theta (pass probability)Vertical: density per theta unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
The shaded posterior area is interval probability; the orange marker is density height. Proper densities integrate to one analytically; finite samples only approximate their shape.
Declared conditions and calculated quantities: W10 · A specified five-trial order
Quantity or conditionExact result, labelled approximation or hold
Proper priorBeta(2,3)
Passes / failures4 / 1
Observed data kindSpecified ordered sequence
Count coefficient1
PosteriorBeta(6,4)
B(A,B)1/504
Posterior density constant504
Evidence for the declared event1/42
Next-pass predictive probability3/5
P(theta > 1/2 | data)191/256
Density at theta = 1/263/32
P(theta = 1/2 | data)0
Full prior / posterior integrals1 / 1 (analytical)
Drawing trapezoid areas (approx)0.9999826 / 1

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Binary trials and the next trial are independent conditional on one fixed theta. Beta notation, density integration and the fixed-n count model are optional definitions supplied locally.

Parameter and predictive uncertainty

W12 · One noisy reading

Parameter and predictive uncertaintyW12 · One noisy reading. Prior, parameter posterior and next-reading predictive densities share an absolute sensor-unit x axis on [-3.1071403821402, 24.337909612909]. All 240 panel intervals resolve the narrowest standard deviation by at least eight intervals. The vertical axis is density per sensor unit. Normal tails continue outside the finite window; no density is renormalised to that window.Parameter and predictive uncertainty≈-3.11≈3.75≈10.6≈17.5≈24.30≈0.129≈0.259PriorParameter posteriorNext readingsensor reading / level (sensor units)Vertical: density per sensor unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
Completing the square adds precisions. The next reading also includes fresh noise; its predictive spread is wider than parameter uncertainty.
Declared conditions and calculated quantities: W12 · One noisy reading
Quantity or conditionExact result, labelled approximation or hold
Prior mean (sensor units)10
Prior variance (sensor units squared)4
Known noise variance9
Readings12
Prior precision (inverse squared units)1/4
Data precision1/9
Posterior precision13/36
Posterior mean138/13
Posterior parameter variance36/13
Next-reading predictive variance153/13
Density displayOne shared absolute sensor-unit axis
Full density integrals1 / 1 / 1 (analytical)
Finite-window areas (approx)1 / 1 / 0.9999366
Prior displayed axis (approx)absolute; centre 10; range -3.1071403821401624 to 24.33790961290939
Parameter posterior displayed axis (approx)absolute; centre 10.615384615384613; range -3.1071403821401624 to 24.33790961290939
Next reading displayed axis (approx)absolute; centre 10.615384615384613; range -3.1071403821401624 to 24.33790961290939

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. N(m,v) uses variance v, not standard deviation. Noise variance is known and positive; readings and the next reading are independent conditional on theta. Full normal densities integrate to one analytically. Finite displayed windows omit tails and are never renormalised.

The same data under different proper priors

Four passes and one failure · Uniform prior

The same data under different proper priorsFour passes and one failure · Uniform prior. Prior density, Posterior density density curves sampled on [0, 1]. The horizontal axis is parameter theta (pass probability); vertical axis is density per theta unit. Full analytical normalisation is separate from the finite drawing window. The shaded posterior area above theta=1/2 has exact probability 57/64. The orange height is density 15/16; the point probability is zero.The same data under different proper priors00.250.50.75101.3271042.654208Prior densityPosterior densityparameter theta (pass probability)Vertical: density per theta unit; heights are not point probabilities240 intervals; no renormalisation to the displayed window
The shaded posterior area is interval probability; the orange marker is density height. Proper densities integrate to one analytically; finite samples only approximate their shape.
Declared conditions and calculated quantities: Four passes and one failure · Uniform prior
Quantity or conditionExact result, labelled approximation or hold
Proper priorBeta(1,1)
Passes / failures4 / 1
Observed data kindFixed-n count
Count coefficient5
PosteriorBeta(5,2)
B(A,B)1/30
Posterior density constant30
Evidence for the declared event1/6
Next-pass predictive probability5/7
P(theta > 1/2 | data)57/64
Density at theta = 1/215/16
P(theta = 1/2 | data)0
Full prior / posterior integrals1 / 1 (analytical)
Drawing trapezoid areas (approx)1 / 0.9999566

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Binary trials and the next trial are independent conditional on one fixed theta. Beta notation, density integration and the fixed-n count model are optional definitions supplied locally.

Calibration checks on a finite forecast record

Forecast record · Matching group proportions

Calibration checks on a finite forecast recordForecast record · Matching group proportions. Forecast 1/5; 4 successes in 20, observed fraction 1/5, difference 0. Forecast 1/2; 10 successes in 20, observed fraction 1/2, difference 0. Forecast 4/5; 16 successes in 20, observed fraction 4/5, difference 0. This finite record is a diagnostic, not a proof of future calibration.Calibration checks on a finite forecast record000.50.5114/2010/2016/20Declared forecast probability (dimensionless)Vertical: observed fraction within each finite groupDashed diagonal: equality; markers are finite record proportions
Observed group fractions test the forecast record on its stated scale. Small groups are coarse and uncertain; a matching finite record proves no universal calibration.
Declared conditions and calculated quantities: Forecast record · Matching group proportions
Quantity or conditionExact result, labelled approximation or hold
Group 1 forecast1/5
Group 1 observed successes / size4 / 20
Group 1 observed fraction1/5
Group 1 observed minus forecast0
Group 2 forecast1/2
Group 2 observed successes / size10 / 20
Group 2 observed fraction1/2
Group 2 observed minus forecast0
Group 3 forecast4/5
Group 3 observed successes / size16 / 20
Group 3 observed fraction4/5
Group 3 observed minus forecast0
Coverage experimentJoint prior-and-data draws differ from repeated data at one fixed parameter.
Model sensitivityInspect prior assumptions, sampling, dependence and plausible alternative likelihoods.
Causal limitConditioning on an alarm does not identify the effect of forcing that alarm.

All quantities describe the stipulated hypothetical model. Conditioning alone identifies no intervention effect. Model-based posterior coverage averages over the declared prior-and-data experiment. It is not an automatic fixed-parameter coverage guarantee. SBC checks inference computation under a model, not the model’s real-world truth.

Worked examples

Identify a source after a flag

Suppliers A,B,C have prior shares 1/2,3/10,1/5 and conditional flag probabilities 1/100,1/50,1/20. Find their posterior shares after a flag.

  1. The supplier events form a disjoint exhaustive partition, and their prior shares sum to one. Multiply each positive prior by its conditional flag probability.
  2. The joint source-and-flag weights are 1/200=5/1000,3/500=6/1000 and 1/100=10/1000.
  3. The evidence probability is their sum 21/1000. Divide each joint weight by this same positive denominator.
  4. The posteriors are 5/21,6/21=2/7 and 10/21; they sum to one. Source C has a much larger share among flags than among all components, a conditional source statement rather than a causal diagnosis.

The posterior supplier probabilities are A:5/21, B:2/7, C:10/21.

Count defects among the flagged cases

The defect prior is 1/50. A hypothetical inspection flags defects with probability 9/10 and nondefects with probability 1/20. Find the defect probability after a flag.

  1. The defect-and-flag joint mass is(1/50)(9/10)=9/500. The nondefect-and-flag mass is(49/50)(1/20)=49/1000.
  2. The evidence probability is 18/1000+49/1000=67/1000. Hence the posterior is(18/1000)/(67/1000)=18/67.
  3. In a cohort constructed proportionally with 10,000 items, the flag column contains 180 defects and 490 nondefects, a total 670. The count calculation 180/670 agrees.
  4. The forward likelihood 9/10 and reverse posterior 18/67 have different denominators. A large nondefective population can supply most flags even when its conditional false-positive rate is relatively small.

The posterior defect probability is 18/67≈0.2687 in the stated population.

Change only the reference population

Keep the likelihoods 9/10 and 1/20, but use defect prior 1/5. Find the posterior after a flag and compare with the rare-defect population.

  1. The new defect-and-flag mass is(1/5)(9/10)=9/50. The new nondefect-and-flag mass is(4/5)(1/20)=1/25.
  2. The evidence is 9/50+2/50=11/50. Its defect share is 9/11≈0.8182.
  3. The likelihood ratio remains(9/10)/(1/20)=18. Prior odds have changed from 1/49 to 1/4, explaining why the same relative evidence produces a different final probability.
  4. The comparison isolates a prior-population change. In an application, verify whether the likelihoods can also be transported to the new setting; identical instrument names do not establish that assumption.

The new posterior is 9/11, compared with 18/67 under the prior 1/50.

Follow evidence that strengthens and then weakens

Start with prior probability 1/5. A first valid Bayes factor is 6; a second correctly history-conditioned factor is 1/3. Find both posterior probabilities.

  1. Convert the prior to odds:(1/5)/(4/5)=1/4. Multiply by 6 to get 3/2.
  2. Convert those odds back to probability:(3/2)/(1+3/2)=3/5.
  3. The next conditional factor 1/3 changes the odds to(3/2)(1/3)=1/2. Its corresponding probability is(1/2)/(1+1/2)=1/3.
  4. The second factor favors the alternative relative to the first posterior, yet the final probability 1/3 is above the original 1/5. A factor describes a relative update, not the final probability level.

After the first evidence the probability is 3/5; after both it is 1/3.

Update without inventing standalone likelihoods

Prior P(H)=1/4. First-event likelihoods are 4/5 versus 1/5. Given the first event, second-event likelihoods are 3/5 versus 2/5. Find P(H) after both observations.

  1. The first joint weights are(1/4)(4/5)=1/5 and(3/4)(1/5)=3/20. They yield first posterior 4/7.
  2. Multiply these joint weights by the supplied history-conditioned second likelihoods. The final weights are(1/5)(3/5)=3/25 and(3/20)(2/5)=3/50.
  3. Their sum is 9/50, so the posterior defect-state weight is(6/50)/(9/50)=2/3.
  4. The odds check is(1/3)×4×(3/2)=2. The second factor is conditional on the first evidence; no independent second likelihood was supplied or required.

The final posterior is 2/3 under the supplied history-conditioned model.

Distinguish a copy from a fresh inspection

In the rare-defect model with prior 1/50 and flag rates 9/10 versus 1/20, compare two flagged records when the second is a copy with two genuinely conditionally independent flags.

  1. One flag gives posterior 18/67. For a perfect copy, the second flag is certain given the first under both hypotheses. Its conditional factor is 1, so the posterior stays 18/67.
  2. For newly generated inspections independent conditional on both defect states, the two-flag joint weights are(1/50)(9/10)²=81/5000 and(49/50)(1/20)²=49/20000.
  3. Their normalization gives 324/(324+49)=324/373≈0.8686.
  4. The two values are not competing answers to one fully specified experiment. They answer different dependence models. Shared noise or partial dependence would require its own conditional likelihoods.

A copy leaves 18/67 unchanged; two conditionally independent flags give 324/373.

Condition on selection before using a flag

Population defect prior is 1/10. Selection rates are 4/5 for defects and 1/5 for nondefects. Given each state, selection and inspection are independent; inspection flag rates are 9/10 and 1/10. Find the selected prior and the posterior after selection plus a flag.

  1. Selected joint masses are(1/10)(4/5)=2/25 and(9/10)(1/5)=9/50. Their sum 13/50 gives selected prior 4/13.
  2. Selected-and-flagged joint masses are(1/10)(4/5)(9/10)=9/125 and(9/10)(1/5)(1/10)=9/500.
  3. The final defect share is(36/500)/(45/500)=4/5. Updating the selected prior 4/13 using the stated selected likelihoods gives the same result.
  4. Using the unselected prior would give 1/2, which conditions only on the flag in another reference population. The conditional independence premise is what permits the supplied inspection rates to remain unchanged after selection.

The selected prior is 4/13; the selected-and-flagged posterior is 4/5.

Keep the count factor in the evidence

A coin has type θ=1/4 or 3/4 with equal prior probabilities. Tosses are independent given its type. Compare observing the ordered record HHT with observing only two H in three tosses.

  1. For HHT, likelihoods θ²(1−θ) are 3/64 and 9/64. Equal-prior evidence is(3/64+9/64)/2=3/32.
  2. Normalizing the joint weights gives posterior type probabilities 1/4 and 3/4.
  3. For the fixed-three-trial count, multiply each likelihood by the three compatible orders. Likelihoods become 9/64 and 27/64, with evidence 9/32.
  4. The shared factor 3 cancels from the posterior, leaving 1/4,3/4. It does not cancel from the probability of the observed event. Likelihoods are normalized over possible data at fixed type, not over the type values.

Both observations give posterior type shares 1/4 and 3/4; their evidences are 3/32 for HHT and 9/32 for the count.

Integrate a posterior density

Optional: an unknown pass probability θ has uniform density on(0,1). After one pass, find its posterior density, the probability θ>3/4 and the probability θ=3/4.

  1. The pass likelihood isθ. The evidence is∫₀¹θ dθ=1/2, so the posterior density is 2θ on(0,1).
  2. The interval probability is∫_{3/4}¹2θ dθ=1−9/16=7/16.
  3. The singleton probability is 0. The density height at 3/4 in this version is 3/2, which is not an event probability.
  4. The likelihood is a probability of the discrete pass observation under the supplied parameter-indexed trial model. The posterior is a density over possible parameter values; those are different roles.

The posterior density is 2θ; P(θ>3/4|pass)=7/16 and P(θ=3/4|pass)=0.

Derive the beta update and a fresh-trial prediction

Optional: use prior Beta(2,3) and four passes plus one failure from conditionally independent binary trials. Find the posterior, ordered and count evidences, and a fresh-trial pass probability.

  1. The prior density is 12θ(1−θ)². A specified ordered record has likelihoodθ⁴(1−θ), giving product 12θ⁵(1−θ)³.
  2. The beta integral B(6,4)=1/504 makes the evidence 12/504=1/42 and posterior density 504θ⁵(1−θ)³, namely Beta(6,4).
  3. The fixed-five-trial count includes 5 orders, giving evidence 5/42 and the same posterior.
  4. For a fresh trial independent of the observed trials given θ, integrateθ against the posterior. The beta-integral ratio B(7,4)/B(6,4)=3/5 gives its pass probability. This is not posterior mass at the single valueθ=3/5.

Posterior Beta(6,4); ordered evidence 1/42; count evidence 5/42; next-pass probability 3/5.

Check whether a posterior can be normalized

Optional: start from the improper kernel 1/[θ(1−θ)] on(0,1). Compare one pass plus one failure with two passes and no failures. What evidence probability is available?

  1. The original kernel is not a probability density: its integral diverges at the endpoints.
  2. For one pass and one failure, multiplying byθ(1−θ) gives a constant kernel. A uniform posterior can be normalized.
  3. For two passes, multiplying byθ² givesθ/(1−θ). Its antiderivative−θ−log(1−θ) diverges asθ approaches 1, so no normalized posterior exists.
  4. Even the successful posterior case supplies no ordinary evidence probability from this improper prior. An arbitrary multiplier of the prior kernel changes the purported evidence while leaving its normalized posterior unchanged.

One pass and one failure give a proper uniform posterior; two passes give no normalizable posterior. Neither establishes a prior-predictive probability from the improper kernel.

Separate parameter spread from a new reading

Optional: prior θ~N(10,4), one reading 12 with conditional law N(θ,9), and a fresh reading independent of the old one given θ. Find the parameter posterior and fresh-reading prediction; second arguments are variances.

  1. The prior-times-likelihood exponent uses(θ−10)²/4+(12−θ)²/9. Completing the square gives(13/36)(θ−138/13)²+4/13.
  2. The θ-independent term joins the normalizing constant. The posterior is N(138/13,36/13).
  3. For a new reading y, integrate its N(θ,9) density against that posterior. Completing the square inθ leaves an N(138/13,9+36/13) density in y.
  4. Thus the predictive law is N(138/13,153/13). Its larger variance includes a new noise realization. If readings use units u, centers use u and the displayed variances useu².

The parameter posterior is N(138/13,36/13); the fresh-reading predictive is N(138/13,153/13).

Try it yourself

  1. Two suppliers have prior shares 3/5,2/5 and flag rates 1/5,7/10. Find the first supplier’s probability after a flag.

    Show the answer and reasoning

    The first supplier’s posterior share is 3/10.

    The joint weights are 3/25 and 7/25, with evidence 2/5. Divide 3/25 by 2/5. Normalizing the likelihoods alone would omit the prior composition.

  2. The defect prior is 1/100. Flag likelihoods are 19/20 for defects and 1/20 for nondefects. Find the defect posterior after a flag.

    Show the answer and reasoning

    The posterior is 19/118≈0.1610.

    The joint weights are 19/2000 and 99/2000, and evidence 118/2000=59/1000. The large nondefective base supplies most flags despite its lower flag likelihood.

  3. Given P(H)=1/10, P(E|H)=3/5 and P(E)=3/20, find P(H|E) and P(E|Hᶜ).

    Show the answer and reasoning

    The posterior is 2/5 and the complement likelihood is 1/10.

    The H-and-E joint is 3/50. Dividing by 3/20 gives 2/5. The remaining evidence mass is 3/20−3/50=9/100; divide it by P(Hᶜ)=9/10 to obtain 1/10.

  4. With prior 1/10 and evidence likelihoods 4/5 versus 1/5, compare P(E|H) with P(H|E).

    Show the answer and reasoning

    The forward conditional is 4/5; the posterior is 4/13.

    The H evidence mass is 2/25 and alternative mass 9/50, totaling 13/50. Its H fraction is 4/13. The shared intersection does not imply equal conditional denominators.

  5. Convert probability 3/25 to odds and odds 5/2 to probability. What does a valid Bayes factor 1 change?

    Show the answer and reasoning

    The odds are 3/22; the probability is 5/7; factor 1 leaves the prior odds and probability unchanged.

    Use O=p/(1−p) and p=O/(1+O). Odds may exceed one. Multiplication by a unit likelihood ratio supplies no relative evidence between the compared hypotheses.

  6. Prior probability is 2/7 and a valid Bayes factor is 3. Find the posterior probability.

    Show the answer and reasoning

    The posterior probability is 6/11.

    Prior odds are 2/5. Multiplication gives posterior odds 6/5, corresponding to(6/5)/(11/5)=6/11. Multiplying the prior probability directly by 3 is not the odds rule.

  7. A model produces a 90% posterior set for almost every dataset. Does this guarantee 90% coverage at every fixed parameter? Does a high fault posterior given an alarm show that forcing the alarm causes faults?

    Show the answer and reasoning

    Neither conclusion follows from the stated information.

    The posterior-set identity gives 90% coverage averaged over joint draws from the model’s prior and likelihood. Fixed-parameter coverage is another repeated experiment. Conditional association with an alarm supplies no intervention mechanism or causal design.

  8. Every positive-prior alternative assigns likelihood zero to the observed discrete event. What does event Bayes return?

    Show the answer and reasoning

    The evidence probability is zero, so the posterior event ratios are undefined.

    All joint evidence weights are zero. Normalizing them gives 0/0. Inspect the observation and model rather than adding an arbitrary number or declaring equal posteriors. Continuous-data density conditioning is a separately specified construction.

  9. A fixed discrete model assigns P(H)=0 and gives the evidence positive probability under another alternative. Can ordinary updating give H a positive posterior?

    Show the answer and reasoning

    No. H retains posterior probability zero in this fixed model.

    P(H∩E)=0 by containment and the evidence denominator is positive. Reconsidering an excluded alternative changes the model or prior. A zero-mass singleton inside a continuous density model is a distinct situation.

  10. Prior probability is 1/4. Two evidence factors are 2 and 5, with the observations independent conditional on each of H and Hᶜ. Find the posterior.

    Show the answer and reasoning

    The posterior is 10/13.

    Prior odds 1/3 become(1/3)×2×5=10/3, then probability 10/13. The within-hypothesis independence premise permits multiplying the standalone factors.

  11. Prior probability is 1/4. A first event has Bayes factor 2; the second record is a perfect copy. Find the posterior after both records.

    Show the answer and reasoning

    The posterior remains 2/5 after the copy.

    The first odds are 2/3, giving 2/5. Conditional on the first observation, the copy has probability one under both hypotheses, so its factor is 1. Squaring 2 would give 4/7 for a different, unjustified independence model.

  12. Prior probability is 1/6. The first factor is 4 and the correctly conditional second factor is 1/2. Find the final posterior.

    Show the answer and reasoning

    The final posterior is 2/7.

    Prior odds 1/5 become(1/5)×4×(1/2)=2/5; convert to 2/7. The second factor weakens the first update while leaving the result above the initial 1/6.

  13. Prior defect probability is 1/5. Selection probabilities are 3/4 versus 1/4. Within the selected population, inspection likelihoods are 2/3 versus 1/6. Find the selected prior and the selected-and-flagged posterior.

    Show the answer and reasoning

    The selected prior is 3/7 and the final posterior is 3/4.

    Selected joint masses 3/20 and 1/5 normalize to 3/7. Using the explicitly selected likelihoods gives weights 2/7 and 2/21, so the final defect share is 3/4. No additional selection-inspection independence assumption is needed because these likelihoods already condition on selection.

  14. Optional: with a uniform prior over pass probability, compare one specified order of three passes and one failure with the fixed-four-trial count of three passes. Trials are independent given the parameter.

    Show the answer and reasoning

    The ordered evidence is 1/20; count evidence is 1/5. Both posterior densities are 20θ³(1−θ) on(0,1).

    The ordered likelihood isθ³(1−θ), whose integral is 1/20. The count has four compatible orders, multiplying likelihood and evidence by 4. That factor cancels from the posterior, not from the data probability.

  15. Optional: under a uniform prior overθ in(0,1), observe two conditionally independent passes. Find the posterior density, P(θ>1/2), and the point probability and density atθ=1/2.

    Show the answer and reasoning

    The density is 3θ²; upper-half probability 7/8; point probability 0 and density height 3/4.

    Evidence∫₀¹θ²dθ=1/3. Integrating 3θ² over(1/2,1) gives 1−1/8=7/8. Density height at a point is not its probability mass.

  16. Optional: prior Beta(3,2), followed by two passes and three failures from trials independent givenθ. Find the posterior and a fresh-trial pass prediction.

    Show the answer and reasoning

    Posterior Beta(5,5), with density 630θ⁴(1−θ)⁴; next-pass probability 1/2.

    Add the success and failure exponents to obtain shapes 5,5. The beta-integral ratio gives 5/10. The add-one answer 3/7 would use a different Beta(1,1) prior. A fresh trial is assumed independent of past trials conditional onθ.

  17. Optional: use the improper prior kernel 1/θ on(0,1). Compare a single failure with a single success. Does either supply an ordinary prior-predictive evidence?

    Show the answer and reasoning

    A failure gives no normalizable posterior; a success gives a uniform posterior. Neither supplies an ordinary marginal evidence from the improper prior.

    Failure produces(1−θ)/θ, whose integral diverges near zero. Success produces a constant kernel with finite integral. An arbitrary prior multiplier still prevents a well-defined probability for the data under that improper object.

  18. Optional: prior N(0,1), one observed reading 3 with known noise variance 4, and a fresh independent noise realization givenθ. Find the parameter posterior and next-reading prediction; the second argument is variance.

    Show the answer and reasoning

    The posterior is N(3/5,4/5); the predictive is N(3/5,24/5).

    Posterior precision is 1+1/4=5/4, and its weighted-center numerator is 3/4, giving center 3/5 and variance 4/5. The predictive density integral adds observation variance 4, giving 24/5. Using 4 as a standard deviation would define a different model.

What to carry forward

  • Bayes’s rule normalizes prior-weighted joint evidence masses; the reverse conditional is not the likelihood.
  • The evidence denominator requires disjoint exhaustive alternatives and positive total mass in the event model.
  • A common likelihood ratio can yield different posteriors in populations with different base rates.
  • Correctly conditional factors multiply odds. Copies and correlated observations need their actual history-conditioned likelihoods.
  • Selection, reporting and the recorded data event belong in the model; factors omitted from posterior shape may still be essential to evidence.
  • Posterior densities assign interval probabilities by integration. Proper normalization and almost-everywhere qualifications remain essential.
  • Parameter uncertainty, future observations, calibration, model adequacy and causal effects are different targets and require their own assumptions.

References

Sources for the concepts and teaching approaches in this article.

  1. Massachusetts Institute of Technology2 sources
    1. 6.041 Probabilistic Systems Analysis and Applied Probability, Fall 2010MIT OpenCourseWare; John TsitsiklisUniversity lectureLecture 2: Conditioning and Bayes’ RuleLecture 21: Bayesian Statistical Inference Iocw.mit.edu
    2. 18.05 Introduction to Probability and Statistics, Spring 2022MIT OpenCourseWare; Jeremy Orloff and Jonathan BloomUniversity course reading · PDFReading 12b: Bayesian Updating: OddsReading 13a: Bayesian Updating with Continuous PriorsReading 15: Conjugate priors: Beta and normalocw.mit.edu
  2. Chapter 6: Model checking and improvementAndrew Gelman and coauthors; author-hosted textbook chapterAuthor-hosted textbook chapter · PDFsites.stat.columbia.eduRead source
  3. Simulation-Based Calibration CheckingStan Development TeamOfficial technical documentationmc-stan.orgRead source
  4. Physical and Metaphysical CounterfactualsJudea Pearl; University of California, Los AngelesAuthor technical report · PDFftp.cs.ucla.eduRead source