Bayesian Updating Example
A worked example of Bayesian updating — combining a prior material property distribution with test data to produce an updated posterior distribution.
Problem
The prior distribution for a material yield strength is normal with mean 340 MPa and standard deviation 30 MPa (representing prior knowledge from similar materials). Three test coupons give measured strengths of 355, 348 and 362 MPa, with a known measurement standard deviation of 10 MPa. Update the yield strength distribution using Bayes' theorem.
Given
- Prior: Sy ~ N(340, 30^2)
- Test data: 355, 348, 362 MPa (3 samples)
- Measurement std: sigma_meas = 10 MPa
- Both prior and likelihood are normal
Solution
For normal prior and normal likelihood with known variance,
the posterior is also normal (conjugate prior):
Sample mean: y_bar = (355 + 348 + 362) / 3 = 355 MPa
Sample size: n = 3
Posterior precision = prior precision + data precision
1/sigma_post^2 = 1/sigma_prior^2 + n/sigma_meas^2
1/sigma_post^2 = 1/900 + 3/100 = 0.00111 + 0.03 = 0.03111
sigma_post^2 = 1/0.03111 = 32.1
sigma_post = 5.67 MPa
Posterior mean:
mu_post = sigma_post^2 * (mu_prior/sigma_prior^2 + n*y_bar/sigma_meas^2)
= 32.1 * (340/900 + 3*355/100)
= 32.1 * (0.378 + 10.65)
= 32.1 * 11.03
= 354.1 MPa
Posterior: Sy ~ N(354.1, 5.67^2)Interpretation
The posterior mean (354 MPa) is shifted towards the test data and the posterior standard deviation (5.7 MPa) is much smaller than the prior (30 MPa) — the test data has significantly reduced the parameter uncertainty. The posterior is dominated by the data because the measurement uncertainty (10 MPa) is much smaller than the prior uncertainty (30 MPa).