Question about how to caculate uncertainty contributions in multivariate case

61 views
Skip to first unread message

charle...@outlook.com

unread,
Apr 9, 2019, 3:07:48 AM4/9/19
to METAS UncLib

Hi,


I don't know how to caculate the uncertainty contribution of inputs to the uncertainty of output in multivariate case? For example,

2019-04-09_145711.png

how to caculate the x1,x2 uncertainty contribution to y1 or y2?


or I also compute a example in matlab and use the unc_budget and get_unc_component, the two function generate different results. Can you tell me how they compute. I also upload the .m file.


unc = @LinProp;

X=unc([1;2;0],[0.25,0.01,0.02;0.01,0.04,0;0.02,0,0.01]);

Y1=X(1)+X(2)+X(3);

Y2=X(1).^2+X(2);

Y3=X(1)+X(3)+2.*X(2);

unc_budget(Y1)

Y1_X1=get_unc_component(Y1, X(1))

Y1_X2=get_unc_component(Y1, X(2))

Y1_X3=get_unc_component(Y1, X(3))


Regards.

Charlene






2019-04-09_145711.png
CE.m

michael.w...@metas.ch

unread,
Apr 12, 2019, 3:20:06 AM4/12/19
to METAS UncLib
Hi,

I don't know how to calculate the uncertainty contribution of inputs to the uncertainty of output in multivariate case?

That's not possible if there is correlation between your input quantities. You can just get the unc component to all of your input quantities which will be 0.6 for your Y1.

If you've correlation between your input quantities then virtual base inputs are created.

X=unc([1;2;0],[0.25,0.01,0.02;0.01,0.04,0;0.02,0,0.01]);

>> jx = get_jacobi(X)

jx =

   -0.0076    0.0089    0.4999
    0.0024   -0.1986    0.0236
    0.0909    0.0060    0.0413

>> cvx = jx * eye(3) * jx'

cvx =

    0.2500    0.0100    0.0200
    0.0100    0.0400   -0.0000
    0.0200   -0.0000    0.0100

eye(3) are the virtual base inputs without correlation and a variance of 1.

>> jyx = get_jacobi2([Y1 Y2 Y3],X)

jyx =

    1.0000    1.0000    1.0000
    2.0000    1.0000         0
    1.0000    2.0000    1.0000

>> jy = jyx * jx

jy =

    0.0857   -0.1837    0.5647 % <-- this what you see when ask for unc_budget(Y1)
   -0.0128   -0.1809    1.0233
    0.0881   -0.3823    0.5883

>> jy_2 = get_jacobi([Y1 Y2 Y3])

jy_2 =

    0.0857   -0.1837    0.5647
   -0.0128   -0.1809    1.0233
    0.0881   -0.3823    0.5883

>> cvy = jyx * jx * eye(3) * jx' * jyx'

cvy =

    0.3600    0.6100    0.4100
    0.6100    1.0800    0.6700
    0.4100    0.6700    0.5000

>> cvy_2 = get_covariance([Y1 Y2 Y3])

cvy_2 =

    0.3600    0.6100    0.4100
    0.6100    1.0800    0.6700
    0.4100    0.6700    0.5000


get_unc_component is implemented like that:

>> unccomp_y1 = jy1_x .* sqrt(diag(cvx)')

unccomp_y1 =

    0.5000    0.2000    0.1000

>> unccomp_y1_b = get_unc_component(Y1, X)

unccomp_y1_b =

    0.5000    0.2000    0.1000

So it assumes that there is no correlation between the input quantities X, because it only takes the diagonal matrix of cvx. All other commands don't have this limitation.

Hope this helps.

Regards
Michael
Reply all
Reply to author
Forward
0 new messages