Sensivity analysis using Sobol indices

This method deals with analysing the influence the random vector \vect{X} = \left( X^1,\ldots,X^{n_X} \right) has on a random variable Y^k which is being studied for uncertainty. Here we attempt to evaluate the part of variance of Y^k due to the different components X^i.

The estimators for the mean of m_{Y^j} and the standard deviation \sigma of Y^k can be obtained from a first sample, as Sobol indices estimation requires two samples of the input variables : (X^1,\ldots,X^{n_X}), that is two sets of N vectors of dimension n_X (x_{11}^{(1)},\ldots,x_{1n_X})^{(1)},\ldots,(x_{N^1}^{(1)},\ldots,x_{Nn_X}^{(1)}) and (x_{11}^{(2)},\ldots,x_{1n_X})^{(2)},\ldots,(x_{N^1}^{(2)},\ldots,x_{Nn_X}^{(2)})

The estimation of sensivity indices for first order consists in estimating the quantity

V_i = \Var{\Expect{ Y^k \vert X_i}} = \Expect{ \Expect{Y^k \vert X_i}^2}  - \Expect{\Expect{ Y^k \vert X_i }} ^2 = U_i - \Expect{Y^k} ^2

Sobol proposes to estimate the quantity U_i = \Expect{\Expect{ Y^k \vert X_i}^2} by swapping every variables in the two samples except the variable X_i between the two calls of the function:

\hat U_i = \frac{1}{N}\sum_{k=1}^N{ Y^k\left( x_{k1}^{(1)},\dots, x_{k(i-1)}^{(1)},x_{ki}^{(1)},x_{k(i+1)}^{(1)},\dots,x_{kn_X}^{(1)}\right) \times Y^k\left( x_{k1}^{(2)},\dots,x_{k(i-1)}^{(2)},x_{ki}^{(1)},x_{k(i+1)}^{(2)},\dots,x_{kn_X}^{(2)}\right)}

Then the n_X first order indices are estimated by

\hat S_i = \frac{\hat V_i}{\hat \sigma^2} = \frac{\hat U_i - m_{Y^k}^2}{\hat \sigma^2}

For the second order, the two variables X_i and X_j are not swapped to estimate U_{ij}, and so on for higher orders, assuming that order < n_X. Then the \binom {n_X}{2} second order indices are estimated by

\hat S_{ij} = \frac{\hat V_{ij}}{\hat \sigma^2} = \frac{\hat U_{ij} - m_{Y^k}^2 - \hat V_i - \hat V_j}{\hat \sigma^2}

For the n_X total order indices T_i, we only swap the variable X_i between the two samples.

API:

References: