Before observing Bernoulli data, assign p a Beta(2,2) prior. Its density is proportional to p(1−p) on the unit interval. After three successes and one failure, multiply this density by the likelihood p³(1−p). The posterior is Beta(5,3), with mean 5/8. Every exponent has a traceable source: data add counts, while the prior contributes its own parameters. This is a specified model of parameter uncertainty, not a likelihood normalized without declaring a prior.
Predict
Predict whether the posterior mean is always the best number to report. It minimizes posterior expected squared error, but absolute error calls for a median, and asymmetric costs can call for a quantile or a thresholded action. An optimality claim must name the loss. Also predict whether a 95% posterior credible interval automatically has 95% frequentist coverage at every fixed p. It need not. Posterior probability conditions on the observed data under the prior model; frequentist coverage repeats data generation at a fixed parameter.
Experiment
Update the same synthetic record under two proper priors and compare the resulting means. Both calculations are internally valid; their disagreement reveals prior sensitivity at this sample size.
Prior
Observed successes/failures
Posterior
Posterior mean
Beta(1,1)
3 / 1
Beta(4,2)
2/3
Beta(2,2)
3 / 1
Beta(5,3)
5/8
Now imagine thirty successes and ten failures. Derive the two posterior means again and compare the size of their difference. This exercise illustrates diminishing influence in this conjugate setting, not a theorem that all priors become harmless in every model. Nonidentifiability and strongly conflicting priors require their own analysis.
Understand
For a Beta(a,b) prior with a,b>0 and a binomial sample with s successes in n trials, the posterior is Beta(a+s,b+n−s). Its mean is (a+s)/(a+b+n). Integrating the next Bernoulli success probability over the posterior gives the same number as the posterior predictive success probability. A predictive statement concerns a future observation; a parameter estimate and an interval for p concern different objects even when they share this calculation.
Under squared loss, posterior expected loss decomposes into (action−posterior mean)² plus posterior variance, proving the mean’s optimality when the second moment exists. For absolute loss, a median minimizes the expectation: left and right slopes bracket zero exactly when the posterior cumulative probability crosses one half. Atoms can produce nonunique medians, so a derivative argument assuming a smooth density is not the most general proof. These are conditional decisions after observing data. Integrating their risks over a proper prior produces a Bayes-risk comparison under additional integrability conditions.
Apply
Suppose an intervention costs c if the hidden state is zero, while withholding it costs d if the state is one. Let q be the posterior probability of state one. The two posterior expected losses are c(1−q) and dq. Act when q>c/(c+d), with a tie at equality, for positive costs. With c=3 and d=1 the threshold is 3/4. A probability threshold of one half is not universal; it reflects equal error costs in this binary setup.
If an improper prior is used, prove that the posterior normalizing integral is finite and positive. An improper prior is not a probability distribution, so statements about prior-averaged risk cannot be imported without qualification. Sensitivity analysis should compare plausible prior choices and explain which substantive information each represents, rather than presenting conjugacy as evidence that a prior is scientifically appropriate.
Continue
Keep prior, likelihood, posterior, prediction and loss as separate entries in the reasoning. The exact-risk widget in Bias, variance and risk can compare the frequentist risks of beta-prior posterior means at fixed p; that is different from averaging risk over the prior. Continue to Multivariate normal projections for the geometric machinery behind regression inference.
Apply · explain · revise
Practice and reasoning
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
A Beta(2,3) prior and 2 successes in 5 Bernoulli trials give what posterior mean?
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
A Beta(1,1) prior and 3 successes in 4 trials give what predictive probability for the next success?
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
Prove the posterior mean minimizes posterior expected squared loss when the second moment exists.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Explain why a posterior median minimizes expected absolute loss.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
If acting costs c when θ=0 and not acting costs d when θ=1, derive the action rule from posterior probability q=P(θ=1|x).
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Explain why posterior propriety and sensitivity must be checked for an improper prior.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.