Page 414 - Numerical Methods for Chemical Engineering
P. 414
MCMC techniques in Bayesian analysis 403
function x dot = batch kinetics dynamics ex(t,x,k1);
cA = x(1); cB = x(2);
r1 = k1*cA*cB;
x dot = zeros(3,1);
x dot(1) = -r1; x dot(2) = −r1; x dot(3) = r1;
return;
We obtain from these calculations an estimate k 1 = 0.0025 and a 95% confidence interval
0.0022 ≤ k 1 ≤ 0.0027.
MCMC techniques in Bayesian analysis
The confidence intervals derived above are based upon a quadratic expansion for S(θ) about
θ M that is only approximate for a nonlinear model. The exact single-response posterior
without this approximation is
1
−(N+1)
p(θ,σ|y) ∝ σ exp − S(θ) (8.148)
2σ 2
While analytical manipulation of this formula is difficult, MCMC simulation is a powerful
tool to obtain posterior expectations of the form
∞
' '
E[g|y] = g(θ,σ)p(θ,σ|y)dσdθ (8.149)
P 0
Many statistical questions can be posed in this form. For example, let us say that we wish
to compute the probability that some hypothesis H is true. Let be the region in (θ,σ)
space in which the hypothesis H is true, and outside of , the hypothesis is false. Let
I (θ,σ) be the indicator function
1, if (θ,σ) ∈
I (θ,σ) = (8.150)
0, if (θ,σ) /∈
For example, if we wish to test the hypothesis that θ lo ≤ θ j ≤ θ hi , we use the indicator
function
1, if θ lo ≤ θ j ≤ θ hi
I (θ,σ) = (8.151)
0, if θ j <θ lo or θ j >θ hi
The probability that the hypothesis is true then takes the form of a posterior expectation of
the indicator function:
∞
' '
p(H |y) = E[I |y] = I (θ,σ)p(θ,σ|y)dσdθ (8.152)
P 0
When the dimension of (θ, σ) space is small, it may be possible to compute (8.152) by
quadrature, but MCMC simulation is generally more efficient.