Uncertainty in Hard, Soft and Hard-Soft
Modeling
Uncertainty in Calculated Model
Parameters using Hard- Modeling Method
The very rigid constraints of a chemical model form a framework within which the fit is confined and which results in a robust analysis, in model-free analysis, this framework is dramatically wider and looser and these methods suffer gradually from a sever lack of robustness. It must be remembered, however, that the choice of the wrong model necessarily results in the rung analysis and wrong resulting parameters.
Model Based Analyses
Complex Formation Equilibrium
M + L ML [M] [L][ML ]
Kf =[ ]
CL = [L] + [ML]CM = [M] + [ML ]
CM = [M] + KF [M] [L]
CL = [L] + KF [M] [L]
Data.m
Spectrophotometric monitoring of complex
formation titration
200 250 300 3500
500
1000
1500
2000
2500
Wavelength
Molar A
bsorptivity
0 0.5 1 1.5 2 2.5 3 3.5 40
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1x 10-3
Mole Ratio, CM/CL
[spe
cies
]
LML
200 250 300 350-0.5
0
0.5
1
1.5
2
Wavelength
Abs
orba
nce
Calculation of Model ParameterThe task of model-based data fitting for a given matrix A, is to determine the best parameters defining matrix C, as well as the best pure responses collected in matrix E.
A = C E + R
A C E R= +
The quality of the fit is represented by the matrix of residuals. Assuming white noise, the sum of the squares, ssq, of all elements ri,j is statistically the best measure to be minimized ssq = ΣΣ r2 I,j
R = A – C E = A – C C+ A = f( A, model, K)
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 60
5
10
15
20
25
30
log beta
ssq
Calculation of Model Parameter
How we can calculate the precision of model parameter?
3.4 3.42 3.44 3.46 3.48 3.5 3.52 3.54 3.56 3.58 3.6
0.18
0.2
0.22
0.24
0.26
0.28
0.3
0.32
0.34
0.36
log beta
ssq
Repeatation
3.496 3.497 3.498 3.499 3.5 3.501 3.502 3.503 3.504 3.5050
2
4
6
8
10
12
14
Calculated K
Freq
uenc
y
Distribution of 50 calculated KDistribution of Fitted Model Parameters
log (Kf) (mean) = 3.5004 Standard Deviation of log (Kf)= 0.0021
Main_ML_S.m
Search for K in a certain range
?Based on repeatation procedure, calculate the standard deviation of fitted parameter in different level of noise
Error Propagation
y = f (x)
var (y) = (df/ dx)2 var (x)
y = f (x1, x2)var (y) = (df/dx1)2 var (x1) + (df/dx2)2 var(x2) + (df/d(x1) d(f)/d(x2) 2cov(x1, x2)
Var(x) =
var(x1), cov(x1, x2), … , cov(x1,xn) cov(x2, x1), var(x1), … , cov(x2, xn)
… … …
cov(xn, x1), cov(xn, x2), … , var(xn)
JT= [ df/dx1, df/dx2, …, df/dxn]
y = f (x1, x2, x3, …)var (y) = JT [Var (x)] J
General Error Propagation
R = A – C E = A – C C+ A = f( A, model, p)A = C E + R
Var(p) =
var(p1), cov(p1, p2), … , cov(p1,pn) cov(p2, p1), var(p2), … , cov(p2, pn)
… … …
cov(pn, p1), cov(pn, p2), … , var(pn)
var (R) =JT [Var(p)] JVar(p) =(JT J)-1 var (R)
var (R) = (Ri,j)2/(nm-np) = ssq/df
Uncertainty of fitted model parameters
R(p1+p1) – R(p1-p1)J1= dR/dp1= 2p1
J1 …J2 JnJ =
…
JnJ2J1
J =
Jacobian Matrix
JT J =
J1TJ1 J1
TJ2 … J1TJn
J2TJ1 J2
TJ2 … J2TJn ………
JnTJ1 Jn
TJ2 … JnTJn
Hessian Matrix
The inverted Hessian matrix H-1, is the variance-covariance matrix of the fitted parameters. The diagonal elements contain information on the parameter variances and the off-diagonal elements the covariances.
Newton-Gauss-Levenberg-Marquardt Algorithmguess parameters, p=pstart initial value for mp
Calculate residuals, r(p) and sum of squares, ssq
ssqold< = > ssq
Calculate Jacobian, J
Calculate shift vector p, and p = p + p
End, display results
=
>
mp=0
mp=0
<
mp ×10 mp / 3
yes
no
Main_ML.m
NGLM algorithm for Fitting
?Use Main_ML m-file for fitting the three parameters (K, CM and CL) with different initial estimates
?Check the uncertainty calculated for K when the initial concentrations are fixed or fitted
Correlation between Fitted Parameters
When two parameters are fitted, is there any relation between calculated parameters?
Is there any relation between the estimated uncertainties on K and C0?
?????????????????????????????????????????
KC0
Main_ML_corr.m
Correlation between fitted parameters
?What are the relations between the shapes and values of Jacobian with variance and covariance of parameters?
?Using the J matrix and calculate the corelation between parameters
Propagation of Uncertainty from Initial Concentration to Equilibrium Constant
K = f(residual, C0)
var(K) = (df/d(residual))2var(residual) +
(dK/dC0)2 var (C0)
(dK/dC0)2 Sensitivity of K to C0
Kopt(C0+C0) – Kopt(C0-C0)dK/dC0 =
2C0
Main_ML_C0
Propagation of uncertainty from C) to K
?What is the effect of noise on measured signal in uncertainty of K due to C0?
?Modify the Main_ML_cO m-file for considering the uncertainty in C0
M and C0L