# Posterior Predictive Checking

> Source: https://modeladay.com/models/posterior-predictive-checking/
> Category: principle | Topics: science, systems, risk | Difficulty: 3/5

## Definition

A posterior predictive check fits a Bayesian model to the observed data, repeatedly draws parameters from its posterior and simulates replicate datasets. Calculate the same feature on observed and simulated datasets and see whether the observed value is unusual.

## Core Rule

A posterior predictive check fits a Bayesian model to the observed data, repeatedly draws parameters from its posterior and simulates replicate datasets. Calculate the same feature on observed and simulated datasets and see whether the observed value is unusual.

## Opening Context

In the late nineteenth century, Simon Newcomb kept timing light as it traveled a fixed distance. Most of his sixty-six readings sat close together, but two came in much shorter. Statisticians later took his figures and asked a model to make a stack of records of its own.

If the model had already seen those measurements, why did its simulated records struggle to produce a reading that short?

That's a question for Posterior Predictive Checking. Use a fitted Bayesian model to simulate the observations again and see whether it can generate a feature that matters in the actual data. We'll follow those short readings through one such check.

## How It Works (Preview)

Nobody had to rebuild Newcomb's experiment. Andrew Gelman and his colleagues used it to show what a fitted model would expect another set of readings to look like. They started with a normal model, in which measurements vary around a central value.

Start a fresh record by drawing a possible center and spread from the distribution you got after seeing the data. That's the posterior, which tells you how much room is left for different values. Use the pair you drew to generate sixty-six readings, the same number Newcomb recorded.

## When It Fails (Preview)

A reassuring plot answers a question about what you've plotted. It's easy to let that answer stand in for a much broader check.

## Full Lesson, Audio & Practice

Get the full Posterior Predictive Checking breakdown, 5-minute audio lesson, interactive mechanism animation, and decision checklist in the ConceptFlow app:
- iOS App Store: https://apps.apple.com/app/conceptflow-mental-models/id6756862333
- Google Play: https://play.google.com/store/apps/details?id=com.juxianyp.conceptflow
- Web page: https://modeladay.com/models/posterior-predictive-checking/

## Related Mental Models

- [Rolling-Origin Evaluation](https://modeladay.com/models/rolling-origin-evaluation/)
- [falsifiability](https://modeladay.com/models/falsifiability/)
- [Bayesian Updating](https://modeladay.com/models/bayesian-updating/)
