Seven of ten participants succeeded at a task, and with a prior the previous lesson turned that into a posterior for the success probability . Now two more participants are about to try. Their outcomes are or , and they would remain uncertain even if were known exactly, so a forecast has to carry both the uncertainty about and the randomness of each attempt. This lesson builds such forecasts, shows why two future outcomes that share one unknown are not independent, and then asks how much the conclusions depend on the prior and whether the model can reproduce the data. The data are constructed for teaching.
Key terms
Posterior predictive distribution
Definition Let be the observed data and future data from the same model. Assume that, given , the future data are independent of the observed data. The posterior predictive distribution gives each possible value of the probability
the conditional probability of given , averaged over the posterior distribution of . With a posterior density this average is the area under over . The same distribution can be approximated by simulation. Draw from the posterior, then draw from the model with that , and repeat many times.
In plain words A forecast has two layers of uncertainty. The parameter is unknown, and even a known leaves each outcome random. Plugging a single estimate in for keeps the second layer and drops the first. The posterior predictive distribution keeps both, and it inherits the assumption that future participants follow the same model as the observed ones.
Example Number the observed attempts to and let be the next outcome, with for a success. Given , the probability of a success is itself, so its posterior average is the posterior mean,
about , and . For this single binary outcome, plugging in the posterior mean gives the same number. That agreement comes from averaging itself, and it need not carry over to events whose probability depends on in a nonlinear way.
Conditional independence
Definition Outcomes and are conditionally independent given if, for every value of and all outcomes and , . Outcomes that are conditionally independent given need not be independent once is averaged over its posterior. The pair is exchangeable if its joint probabilities do not change when the order of the outcomes is swapped. Exchangeable outcomes need not be independent.
In plain words If were known, one participant’s result would say nothing about the next. But is unknown and both outcomes depend on the same . A success makes larger values of more plausible, and that raises the forecast for the next attempt.
Example Given , the chance that both and are successes is . The predictive probability is therefore the posterior average of , which for is
whereas squaring the posterior mean gives
about . The gap is exactly the posterior variance , so it is not rounding error. The same answer comes in two steps. The first success has predictive probability , and if it happened the posterior would become , giving the second success probability . The product is . So , which is larger than , and the two future outcomes are dependent. They are exchangeable, since success then failure and failure then success both have predictive probability .
Beta-binomial predictive distribution
Definition Suppose the posterior is and future trials are conditionally independent given , each with success probability , and independent of the observed data given . The number of future successes has the beta-binomial predictive distribution
for , where is the constant from the beta density. Its mean is with , the same as the plug-in mean. Its variance is the plug-in variance multiplied by , a factor larger than when .
In plain words Given the count is binomial, and the posterior says how uncertain is. Mixing the two spreads the forecast more widely than the plug-in binomial with fixed at , as soon as . A simulation has to respect that structure. Draw one for the whole group of future trials, then the count. Drawing a fresh for every single trial gives independent trials that each succeed with probability , which is the plug-in binomial again.
Example For the next attempts under , no successes has probability , exactly one success has probability , and two successes have probability , so
The plug-in gives , and , with less weight on the two extremes. A 95 percent credible interval for is a set of values between and , while a predictive set for is a set of counts. Here the smallest count set with predictive probability at least is all of , because leaving out even the least probable count keeps only .
Prior sensitivity
Definition Prior sensitivity is the extent to which posterior conclusions change when the prior is replaced by other defensible priors while the data and the likelihood stay the same. A prior sensitivity analysis reports the conclusions under several stated priors, each with its reason. Sensitivity to the likelihood, such as the assumptions of a common and of independence, is a separate question that changing the prior does not address.
In plain words If several reasonable priors lead to the same practical conclusion, that conclusion does not hinge on the choice among them. If they lead to different conclusions, the data alone have not settled the question, and the report should say so. A prior is chosen for a reason given in advance, not after seeing which one gives a preferred answer. A highly concentrated prior is a strong assumption and not extra data.
Example Hold the successes in attempts fixed and vary the prior.
| Prior | Posterior | Mean | |
|---|---|---|---|
The posterior means are exactly , and . The two weak priors give similar answers. The prior is concentrated near , and in the posterior mean formula its two shape parameters add to , which leaves the ten attempts a weight of only . Whether that concentration is justified depends on what was known before the study, and the arithmetic cannot decide it.
Prior predictive check
Definition The prior predictive distribution is the distribution of the data implied by the prior and the likelihood together, before any data are observed. It gives each possible data set the probability , the average over the prior. A prior predictive check draws from the prior, draws a data set with the planned design from the model with that , repeats this many times, and compares summaries of the simulated data with what is known to be plausible. With a prior and binomial trials, the prior predictive distribution of the count is the beta-binomial distribution of the earlier card with , and .
In plain words Before trusting a prior, look at the data it expects. Parameters are hard to judge directly, but predicted data are often easy to compare with background knowledge. A prior that regularly predicts implausible data needs another look, and so do the likelihood and the measurement scale behind it.
Example For attempts the flat prior gives every count from to probability . The prior gives or successes probability about . The prior gives or successes probability only about and puts about on counts from to . If earlier experience suggests that a good instruction card can make nearly every participant succeed, the prior conflicts with that experience, and the check shows the conflict before any data are collected.
Posterior predictive check
Definition A posterior predictive check draws from the posterior, draws a replicated data set with the same design as the observed data from the model with that , and repeats this many times. It compares a chosen test quantity , computed on each replication, with its observed value , for example through the proportion of replications with . The test quantity should target a feature the model might fail to capture. A check can reveal a mismatch, but it cannot prove the model correct. The posterior was fitted to the same data, so the check is not an independent test, and its tail proportion does not behave like a classical p-value in general.
In plain words Ask whether data simulated from the fitted model look like the data actually seen, in the respects that matter for the question. A total that the model was fitted to will usually look fine. A feature such as a difference between groups is a sharper test of a model that assumes one common .
Example Suppose the ten attempts came from two sites of five participants each, with successes at one site and at the other, so , the absolute difference between the site counts, is . Draw from , then two site counts from with that same . Replicated totals are or more in about 51 percent of replications, so the total gives no warning, as expected. A site difference of or more occurs in about 8.3 percent of replications. That is somewhat unusual under one common , but ten attempts are too few to settle whether the sites differ. The check points to a question for more data or for the study design, and it does not prove the common- model either right or wrong.
Check yourself
- Under the posterior, find the predictive probability that the next two attempts contain exactly one success. Compare it with the plug-in binomial calculation that fixes , and say which model each calculation uses.
Show the answer
Success then failure has predictive probability , because after a hypothetical success the posterior would be . Failure then success has the same probability . The total is
about . The plug-in calculation gives . The plug-in model treats as known to equal and the two attempts as independent. The predictive calculation averages over the posterior uncertainty about the shared , which moves probability away from the mixed result, one success and one failure, toward the two extremes, both successes or both failures.
- A colleague says that the 95 percent equal-tailed credible interval for is also a 95 percent prediction for the next participant’s outcome. What is wrong, and what is the smallest set of outcomes with predictive probability at least ?
Show the answer
The interval describes uncertainty about the parameter . The next outcome is or , so it never lies in . Its predictive distribution gives probability to a success and to a failure. A set containing only one outcome has predictive probability at most , so the smallest set with probability at least is . For a single binary outcome the 95 percent predictive set is trivial, and the predictive probabilities themselves are the informative summary.
- Keep the data fixed at successes in attempts. Find the predictive probability that the next attempt succeeds and that the next two both succeed, under the prior and under the prior. If the two weaker priors and give similar answers, does that show the model is correct?
Show the answer
Under the posterior is . The next attempt succeeds with probability , and the next two both succeed with probability . Under the posterior is , with probabilities and . The answers, and , sit close to the answers, so the forecasts change only a little between those two priors. The forecasts are much lower, so a strongly concentrated prior would change the conclusion and needs its own justification. Agreement between the weaker priors does not show the model is correct. All three analyses share the same likelihood, with one common and attempts that are independent given , and if participants at different sites have different success probabilities, the weaker priors can agree while the model they share is wrong. Agreement across reasonable priors shows stability with respect to the prior, while checks of the likelihood and the design address the rest.