Math With AmarA C A D E M Y
All math animations

Graduate · Beta–Bernoulli updating

Beta–Bernoulli updating: A mildly skeptical prior

Beta–Bernoulli updating: investigate a mildly skeptical prior with prior shape α = 2; prior shape β = 3.

Predict what will happen, press Play, then pause and explain what changed. Every control also works without playback.

Watch the relationship

Paused
Beta–Bernoulli updating: A mildly skeptical prior. Observations included: 0. Posterior α: 2. Posterior β: 3. Predictive success probability: 0.4A density over an unknown probability01.7800.51posterior densityAfter 0 observations · dashed: prior density
The prior shapes are positive integers and trials are conditionally independent given one fixed p. The displayed ten outcomes are illustrative fixed data, not a live experiment. Densities integrate to one and exact parameter singletons have zero probability.

Starts paused. Play once, pause anywhere, or use Step to inspect the mathematics. Playback stops when this panel leaves the screen.

Make it your experiment

Change one value. Notice what follows.

The controls adjust the model. Numbers below describe the current frame. Decimals are rounded.

Observations included
0
Posterior α
2
Posterior β
3
Predictive success probability
0.4

HD animation studio

From experiment to screen.

Present a crisp Canvas scene, save a full-HD image, or capture your model as a silent video.

Understand what you are seeing

The idea behind the motion.

A Beta prior describes uncertainty about an unknown Bernoulli probability. Multiplying by a conditionally independent Bernoulli likelihood adds success and failure counts to the two shape parameters. The posterior mean predicts one additional outcome but is not the probability mass at that one exact parameter value. This investigation starts with Prior shape α = 2; Prior shape β = 3. Predict the result before playing, then change one parameter while keeping the other fixed to test the reason for the change.

A relationship to keep

p|data ~ Beta(α+s,β+n−s); predictive P(success)=(α+s)/(α+β+n)

Read the symbols alongside the explanation. A diagram shows the relationship; the assumptions tell you when it applies.

  1. STEP 1

    Set up the mathematical model

    Choose prior shape parameters and inspect their initial density on the probability interval from zero to one. The starting case is “A mildly skeptical prior.”

  2. STEP 2

    Follow the changing quantity

    Reveal the fixed illustrative sequence 1,1,0,1,0,0,1,1,0,1 one outcome at a time. Track posterior shapes after each update.

  3. STEP 3

    Explain and test the result

    Compare priors after the same six successes and four failures. Distinguish the posterior density's height from the predictive probability computed by integrating p against that density.

Your turn to explain

Make a prediction. Test your reasoning.

Keep Prior shape α = 2; Prior shape β = 3. Pause the timeline at 100%. Given observations included = 10, calculate posterior α, posterior β, predictive success probability. Show the substitution into the displayed formula.

Use the values specified in the question. Reset restores the initial values for this investigation.

Compare your explanation

Among n=10 observations there are 6 successes and 4 failures. Add these to prior shapes (2,3) to obtain Beta(8,7); the predictive probability is 8/(8+7)=0.533333. Results: Posterior α: 8; Posterior β: 7; Predictive success probability: 0.533. Decimal values are rounded; retain the original parameters when checking.

Connect the animation to a worked example and practice questions.