Prior Predictive Simulation

Linear Regression — What Does Your Prior Imply About Data?

Drag σβ to change the prior on the slope. Each draw samples α ~ N(0, 10²) and β ~ N(0, σβ²), then plots E[y|x] = α + βx. Watch "vague" priors generate implausible near-vertical lines.

▾ click for more detail

Prior Predictive Lines — E[y | x]

Prior on Slope β

0.1 1.0 6.0
20 150 400
1 42 99
Prior Specification
Intercept Prior
α ~ N(0, 10²)
Slope Prior
β ~ N(0, 1²)
Model
E[y|x] = α + βx
Predictor Range
x ∈ [−2, 2]
n Lines Drawn
150
y-axis Clipped To
± ∞
|β| > 10 in prior
|β| > 50 in prior
Mean |Δy| over x
SD of drawn β
Prior assessment