What Bayesian inference does, in pictures

IDEAS FOR THE FUTURE SIMMIS. These articles connect implemented research foundations to longer term product direction. They do not describe universal behaviour in the current Simmis product.

Imagine deciding whether to hire three engineers in Q3 rather than Q4. A point forecast may hide how uncertain the result is. This article uses that decision to explain probabilistic programming foundations implemented in Spindel and how a governed organizational record could later support Simmis learning.

A probabilistic model can return a distribution instead of a single estimate. The distribution describes the futures that the model considers plausible and the relative probability assigned to each one. Bayesian inference explains how evidence changes that distribution.

Start with what you already believe

Before the system sees the current data, the model begins with a structured representation of uncertainty called the prior. A prior may reflect earlier evidence, domain knowledge, or an intentionally weak starting assumption.

prior low high value of unknown quantity probability
The wide prior represents substantial uncertainty before the model considers the current evidence.

A wide prior assigns meaningful probability to many values. A narrow prior concentrates probability within a smaller range. Either may be defensible when its assumptions are explicit. The prior records what the model assumes before it considers the current evidence.

Some decision support tools leave their starting assumptions implicit. Bayesian analysis requires the modeller to state those assumptions as a prior and then update them in light of evidence. That requirement makes the starting point available for inspection and challenge.

Data changes the distribution

Now observations, measurements, or historical outcomes enter the model. The model evaluates how well each possible value of the unknown could have produced those observations. That relationship between the data and the possible values is the likelihood.

likelihood prior (unchanged) data
The data clusters around one region. The likelihood peaks where the candidate values fit those observations most closely.

The likelihood measures fit rather than belief. For each possible value of the unknown, it describes how probable the observed data would be under that value.

The update

Multiplying the prior by the likelihood and normalizing the result produces the posterior, which represents the updated distribution after observing the data.

posterior prior likelihood posterior
In this example, the posterior is narrower and shifts towards the data cluster. The prior and likelihood both influence its shape.

Informative evidence can make the posterior narrower than the prior when the model is well specified. The posterior may also remain wide, shift, or become more complex. In this example, it is centred near the data cluster but retains some influence from the prior. Prior knowledge remains in the calculation, with its influence determined by both the prior and the likelihood.

Why a distribution beats a number

A point forecast might say, “Q3 velocity will be 82 story points.” A Bayesian model could instead estimate that Q3 velocity will most likely fall between 78 and 86 story points, with a 12% chance of falling below 65 if onboarding runs long.

That 12% tail is part of the result. A decision based only on the point estimate would omit a scenario that the model assigns meaningful probability.

most likely value 12% chance below threshold risk threshold
The point estimate omits the left tail, which this model assigns a 12% probability.
Illustrative future Simmis output A sufficiently specified model could estimate a 73% probability of reaching the October release, given the current data. It might also identify the compliance review window as a larger modelled risk than engineering throughput. The estimate would combine prior assumptions about the team with current velocity data and known blockers.

Sequential updating

Bayesian updating can proceed sequentially. Today’s posterior becomes tomorrow’s prior. Each relevant observation may sharpen or shift a well specified model.

start after week 1 after week 4 after week 8 informative data, narrower posterior
In this example, each week of informative observations narrows the posterior while the earlier evidence remains part of the update.

Sequential updating treats new data as evidence about the modelled world. After eight weeks of sprint data, the model may have a sharper estimate of the team’s velocity distribution than it had at week one, assuming the observations remain relevant and the model remains suitable.

A wide posterior can also reveal that the model’s conclusion is fragile. That result may accurately represent limited evidence rather than a failed calculation. The appropriate answer may be that the available data does not support a confident estimate and that specified new evidence could narrow it.

What this looks like in code

Spindel implements these probabilistic programming foundations. A probabilistic model uses two additional effects. sample draws from a prior, and observe conditions on evidence. Spindel descends from the Anglican line of probabilistic programming, and the distribution runtime (anglican.runtime) is a direct dependency. These primitives inform the future Simmis learning layer. They do not describe universal behaviour in the current product.

What is this syntax?
require('[org.replikativ.spindel.spin.cps :refer [spin]]
  '[org.replikativ.spindel.inference.effects :refer [sample observe]]
  '[org.replikativ.spindel.inference.inference :as infer]
  '[org.replikativ.spindel.effects.await :refer [await]]
  '[anglican.runtime :refer [beta flip]])

;; A credence we cannot read off directly, such as "the debt came due",
;; starting from a prior and updated by each item in the record.
defn came-due []:
  spin(let [p sample(beta(2 2))]:
    observe(flip(p) true)
    observe(flip(p) true)
    observe(flip(p) false)
    p
  end)
end

;; Inference returns a posterior distribution rather than a verdict.
@spin(infer/query(await(infer/importance-sampling(came-due() 5000)) identity))
;; => {:mean 0.58 :std-dev 0.16 ...}
(require '[org.replikativ.spindel.spin.cps :refer [spin]]
         '[org.replikativ.spindel.inference.effects :refer [sample observe]]
         '[org.replikativ.spindel.inference.inference :as infer]
         '[org.replikativ.spindel.effects.await :refer [await]]
         '[anglican.runtime :refer [beta flip]])

;; A credence we cannot read off directly, such as "the debt came due",
;; starting from a prior and updated by each item in the record.
(defn came-due []
  (spin
    (let [p (sample (beta 2 2))]   ; prior over the credence
      (observe (flip p) true)      ; invoice dated and delivered
      (observe (flip p) true)      ; the agreed payment window elapsed
      (observe (flip p) false)     ; respondent disputes the due date
      p)))

;; Inference returns a posterior distribution rather than a verdict.
@(spin (infer/query (await (infer/importance-sampling (came-due) 5000))
                    identity))
;; => {:mean 0.58 :std-dev 0.16 ...}

The same sample and observe structure supports forward simulation or inference conditioned on real data. It also informs the legal dispute simulator, where each disputed element carries a credence like p above and the verdict is read from the posterior.

Bayesian inference gives a model a disciplined way to update a distribution when evidence arrives. A posterior does not make uncertainty automatically trustworthy. Its usefulness still depends on the model assumptions, the quality of the evidence, and the inference method.

For Simmis, the nearer term prerequisite is a governed record of the basis, attempt, decision, and outcome. That history could later support learning about which agents, procedures, assumptions, and decisions work under specified conditions.

Further reading

  • van de Meent, Paige, Yang & Wood, An Introduction to Probabilistic Programming (2018). arXiv:1809.10756.
  • The importance sampling, SMC, particle MCMC, and BBVI inference kernels live in Spindel under inference/.
FROM AGENT OUTPUT TO ORGANIZATIONAL WORK

See how Simmis lets teams delegate consequential work without losing control of what becomes official.

inspect the source Simmis Cloud waitlist