RESEARCH DESK
Probability laboratory
Experiment with Bayesian updating and reinforcement using reproducible teaching models.
Reading lists · Research trails · Research map · Probability laboratory
Two small, fully specified teaching models. Change assumptions, inspect the numbers, and export every step. They do not reproduce or validate the linked research. Download the model implementations (JavaScript).
01 / BELIEF UPDATING
A binary Bayesian update
H is a hypothesis and E is an observation. The two hypotheses H and not-H are exhaustive. Repeated observations are assumed conditionally independent given the hypothesis, with fixed likelihoods.
P(H|E) = P(H) P(E|H) / [P(H) P(E|H) + (1 − P(H)) P(E|not-H)]
Worked example: a prior of 0.20 and likelihoods 0.80 and 0.20 give a posterior of 0.50 after E. A subsequent not-E returns it to 0.20.
Enable JavaScript to update the worked example.
Numerical history
| Step | Observation | P(H) |
|---|
Changing any assumption resets the observations. Impossible evidence is reported without changing the state. At most 100 observations per run.
MIT probability course: conditional probability and inference · Related Active Inference reading
02 / REINFORCEMENT
A reinforced urn
Draw one token with probability proportional to its color's current count. Replace it and add r extra tokens of that color. With r = 0 the composition stays fixed. Every run uses the displayed 32-bit seed; identical inputs reproduce identical draws.
With one token of each color, the first draw has amber probability 0.50.
Every draw and token count
| Draw | Color | Amber | Blue | Amber fraction |
|---|
This stochastic urn illustrates reinforcement. It has no spatial interactions, physiology, pheromone dynamics or fitted biological parameters and is not an ant-colony model.
Mathematical definition and analysis by Djalil Chafaï · Related models and biological evidence