Page 408 - Numerical Methods for Chemical Engineering
P. 408
Confidence intervals from the approximate posterior density 397
There is a 100 × (1 − α)% chance that
|θ − ¯ y|
|Z|= −1/2 ≤ Z α/2 (8.128)
σ N
so that the 100 × (1 − α)% confidence interval for the parameter is
θ = ¯ y ± Z α/2 σ N −1/2 (8.129)
Typically, we form 95% confidence intervals, with α = 0.05, and 99% confidence intervals
with α = 0.01. Using the MATLAB Statistics toolkit, we compute the value of Z α/2 with
the command
Z alpha 2 = norminv(1-alpha/2,0,1);
For α = 0.05, Z α/2 = 1.9600 and for α = 0.01, Z α/2 = 2.5758.
Here, we use the frequentist term confidence interval, as it is standard usage, but more
accurately, in the Bayesian perspective, we should call this a credible interval, meaning that
the parameter has a probability(1 − α) of lying in this interval. A frequentist confidence
interval, by contrast, states that if we repeat the same set of experiments many times, we
obtain an estimate of the parameter in this interval (1 − α)th of the time. The Bayesian
viewpoint is more direct.
Now, for our problem, we do not know the exact value of σ, so instead of forming
the confidence interval from the unit normal distribution N(0, 1), we form it using the
t-distribution (8.123) which is somewhat broader due to the extra uncertainty in the value
of σ. We define T ν,α/2 as the value for which
'
T ν,α/2
p(t|ν)dt = 1 − α (8.130)
−T ν,α/2
There is a 100 × (1 − α)% chance that the t-statistic is in the range
¯ y − θ
|t|= √ ≤ T ν,α/2 (8.131)
(s/ N)
The 100 × (1 − α)% confidence interval on θ is then
θ = ¯ y ± T ν,α/2 sN −1/2 (8.132)
With the MATLAB Statistics toolkit, we compute T ν,α/2 by the command
T val = tinv(1-alpha/2,nu);
Confidence intervals for model parameters
We now use the t-distribution to form confidence intervals from the approximate posterior
density π(θ,σ|y), (8.116), and its approximate marginal posterior density π(θ|y), (8.118).
Once again, let us assume that we know the exact value of σ. The conditional posterior for
θ is then
1 T T
1
π(θ|y,σ) ∝ exp − (θ − θ M ) [X X| θ M ](θ − θ M ) (8.133)
2σ 2