Sobol Sensitivity Indices Simulator Back
Uncertainty Quantification

Sobol Sensitivity Indices Simulator

A hands-on global sensitivity analysis tool that decomposes how input uncertainty drives output variance into main effects and interactions. Using the analytic model f = a1·X1 + a2·X2 + a3·X1·X2, drag the sliders to compare the first-order index S_i, the total index S_Ti and the interaction S_ij in real time.

Parameters
a1 (linear coefficient of X1)
Strength of the X1 main effect. Setting it to 0 removes X1's main effect.
a2 (linear coefficient of X2)
Strength of the X2 main effect.
a3 (X1·X2 interaction coefficient)
Strength of the cross term. With a3 = 0 the model is additive and S_T = S.
Variance of X1 (σ₁²)
Uncertainty of X1 (zero mean assumed).
Variance of X2 (σ₂²)
Uncertainty of X2 (zero mean, independent of X1).
Results
Total variance Var[Y]
First-order S₁
First-order S₂
Total S_T₁
Total S_T₂
Interaction S₁₂ (%)
ANOVA decomposition — from input distributions to output variance

Input distributions of X1 and X2 feed the model f(X), whose output variance splits into the three components V1, V2 and V12. Stack height represents each Sobol contribution.

Contribution stack — V1 / V2 / V12
Sweep — total index S_T1 versus interaction coefficient a3
Theory & Key Formulas

$$Var[Y] = \sum_i V_i + \sum_{i\lt j} V_{ij} + \cdots,\quad S_i = \frac{V_i}{Var[Y]},\quad S_{Ti} = S_i + \sum_{j\neq i} S_{ij} + \cdots$$

ANOVA decomposition splits the total output variance into main effects V_i and interactions V_{ij}. The gap between the first-order S_i and the total S_Ti quantifies how much input i interacts with the others.

$$f(X_1,X_2) = a_1 X_1 + a_2 X_2 + a_3 X_1 X_2,\quad V_1 = a_1^2\sigma_1^2,\; V_2 = a_2^2\sigma_2^2,\; V_{12} = a_3^2\sigma_1^2\sigma_2^2$$

For independent X1, X2 with zero mean the components are available in closed form. With a3 = 0 the model is additive and S_T equals S.

Sobol indices and global sensitivity analysis

🙋
Sensitivity analysis means I wiggle an input and see how the output reacts, right? What is so special about Sobol indices?
🎓
Nice question. Most "sensitivities" you meet in undergrad are local, like the partial derivative ∂f/∂x at one operating point. Sobol belongs to a different family called global sensitivity analysis (GSA). It treats every input X_i as a random variable and asks: across the whole input distribution, what fraction of the output variance is caused by X_i? You get an answer between 0 and 1, which is meaningful even when f is highly non-linear and non-additive. That is why CFD and climate codes have made it the default tool.
🙋
The cards show S₁ = 0.643 and S_T₁ = 0.714 at the default values. Why are they not equal?
🎓
That gap is the most informative thing in the whole panel. S_i tells you how much variance disappears if you froze X_i at a single value. S_Ti tells you what variance is left if you froze everything except X_i. The difference S_T₁ − S₁ = 0.071 is exactly the part of the variance that X₁ creates by interacting with X₂. Try setting the a3 slider to zero and you will see S₁ and S_T₁ collapse onto each other — that is the signature of an additive model.
🙋
So if I push the interaction coefficient a3 up, S_T₁ grows because X₁ "borrows" influence through the cross term?
🎓
Exactly. The sweep plot at the bottom shows S_T₁ climbing toward 1 as |a3| grows. The physical picture is that the effect of X₁ depends on the current value of X₂. A textbook example is the aerodynamic lift coefficient as a function of angle of attack and Mach number — the slope with respect to alpha changes with M. Looking at S₁ alone would say "alpha is moderately important", but looking at S_T₁ reveals its true importance.
🙋
Real CFD or FEM models do not have these clean analytic formulas. How does anyone compute Sobol indices in practice?
🎓
By sampling. The standard estimator is Saltelli's: with d inputs and a base sample of N, you need N·(d+2) model runs to get S_i and S_Ti simultaneously. For d = 10 and N = 1024 that is about 12,000 evaluations. If one CFD case takes an hour, that is roughly 500 days, so production workflows fit a surrogate first — Kriging, polynomial chaos expansion (PCE), or a neural network — and run Sobol on the cheap surrogate. A two-stage approach where Morris does the initial screening and Sobol refines the short list is the cost-effective standard.
🙋
If an input has a tiny S_T, can I just remove it from the model?
🎓
In most cases, yes — that is the famous dimension-reduction use of Sobol. If S_Ti is close to zero, you can fix the input at a nominal value and drop it from further studies. Two warnings, though. First, the conclusion holds only over the current input ranges; widen them and a small S_T can rise sharply. Second, Sobol is variance-based, so it ignores inputs that shift the mean without affecting the spread. Quantities like safety factors or design allowables care about the mean, so always double-check those with a moment-independent indicator or a Borgonovo δ. Teams that blindly drop inputs because "S_T is small" get burned often.

Frequently Asked Questions

The first-order index S_i is the variance contribution of input X_i acting alone (its main effect), S_i = V_i/Var[Y]. The total index S_Ti adds every term that involves X_i, including all interactions: S_Ti = S_i + sum_{j != i} S_{ij} + … The gap S_Ti − S_i tells you how strongly X_i interacts with the other inputs. A large gap means that fixing X_i alone will not reduce the output variance as much as the main effect suggests.
Morris elementary effects and rank-based PCC/SRC are cheap but only look at local sensitivities along the input distribution. For non-linear, non-additive outputs these local indices can rank inputs incorrectly. Sobol is a global sensitivity analysis (GSA) method that integrates over the entire input distribution and makes no additivity or linearity assumption. The trade-off is cost: convergence requires of the order of N·(d+2) evaluations with Saltelli sampling. The pragmatic recipe is to screen first with Morris and then refine the short list with Sobol.
With Saltelli sampling you need a total of N·(d+2) evaluations to estimate both S_i and S_Ti for input dimension d and base sample size N. For d = 5 and N = 1024 that is about 7,000 model runs. For expensive solvers (CFD, FEM) that cost minutes per case, you usually train a surrogate first (Kriging, polynomial chaos, neural network) and run Sobol on the surrogate. Closed-form expressions like the one in this tool are the exception; production work almost always uses Monte Carlo or quasi-MC sampling.
Inputs with S_Ti close to zero contribute almost nothing to the output variance, so within the UQ scope they can be fixed at a nominal value. This is the well-known screening and dimension-reduction use of Sobol. Two caveats: first, the conclusion is valid only over the current input distribution, so widening the ranges can revive a small S_T; second, S_T is variance-based and ignores inputs that shift only the mean (the bias). For quantities driven by their mean — safety factors, allowable values — confirm with a complementary indicator.

Real-world applications

CFD design optimisation: set the drag coefficient C_D as the output and feed in 10–30 uncertain inputs (angle of attack, Mach number, Reynolds number, turbulence model constants, ...). Sobol indices reveal the true drivers — "Mach number has S_T = 0.7", for example. Such quantitative rankings drive design-space pruning and prioritise training samples for surrogate models. Typical stacks are OpenFOAM + Dakota or SU2 + UQpy.

Allowable design in FEM: material properties (Young's modulus, yield stress, density) and geometric dimensions (thickness, fillet radius) all carry tolerances. Sobol decomposes their contribution to the variance of peak stress or natural frequency, so engineers can tighten the spec on the few dominant inputs and relax it on the rest to save cost. Aerospace and automotive certification packages increasingly request a UQ summary table built this way.

Climate and environmental modelling: general circulation models (GCM) carry hundreds of parameterisation constants, and Sobol indices are the workhorse for attributing uncertainty in cloud cover or equilibrium climate sensitivity (ECS). Because a single GCM run takes hours to days, Sobol is almost always computed on a PCE surrogate. IPCC working-group reports rely on variance decomposition for many of their headline uncertainty figures.

Explainable machine learning: researchers now use Sobol as a complement to SHAP for ranking feature importance in neural networks or gradient-boosting models. SHAP excels at local contributions, while Sobol summarises behaviour across the whole input distribution — handy for documenting model behaviour in regulated domains such as biotech, healthcare and finance.

Pitfalls and common misconceptions

The biggest pitfall is treating Sobol indices as valid under correlated inputs. The classical estimator assumes inputs are mutually independent. In practice "rainfall and temperature" or "yield stress and Young's modulus" are correlated, and pretending otherwise makes the indices cannibalise each other into nonsensical rankings. Use one of the correlated extensions (Kucherenko's method, Mara & Tarantola's Shapley effects) or transform the inputs to uncorrelated principal components before sampling. Never trust a Sobol table that does not state how independence was verified.

Next, not checking convergence of the sampling estimator. Saltelli converges to the true value only as N → ∞; at finite N there is bias, and the total index S_T is the worst offender. It is normal for S_T₁ to read 0.3 at N = 128 and 0.6 at N = 4096. A defensible study doubles N until S_i and S_Ti stabilise and reports bootstrap confidence intervals. A conference slide that prints Sobol numbers without convergence plots is essentially decoration.

Finally, using Sobol as the only ranking metric. Sobol is variance-based, so it only sees the spread of the output, not the full shape. For heavy-tailed outputs ("most of the time safe but occasionally catastrophic") inputs with low Sobol rank can in fact dominate the tail risk. Modern UQ workflows combine Sobol with moment-independent indicators (Borgonovo's δ), PAWN density-based indices, and tail-quantile sensitivities such as VaR/CVaR derivatives. Sobol is powerful but not omnipotent — treat it as one entry in a wider sensitivity dashboard.

How to Use

  1. Enter coefficients (a1, a2, a3) defining your model: Y = a₁X₁ + a₂X₂ + a₃X₁X₂
  2. Set input variances (Var[X₁], Var[X₂]) representing uncertainty ranges for each parameter
  3. Click Compute to decompose total output variance into first-order main effects S₁, S₂ and total indices S_T₁, S_T₂, plus two-way interaction S₁₂
  4. Review variance contribution percentages to identify which inputs drive model output most strongly

Worked Example

Consider a structural deflection model: δ = 0.5×Load + 0.3×Span + 0.1×Load×Span (mm). Set a₁=0.5, a₂=0.3, a₃=0.1 with Var[Load]=4 kN² and Var[Span]=9 m². Total variance computes to Var[δ]=3.75 mm². Results show S₁(Load)=53%, S₁(Span)=24%, S₁₂(interaction)=15%, S_T₁=68%, S_T₂=39%, indicating Load dominates with significant interaction effects. Material engineer recognizes Load uncertainty requires tighter specification.

Practical Notes

  1. Sobol indices sum to 100% only for first-order; total indices can exceed 100% when interactions are strong (S_T₁+S_T₂ > 100% signals coupled parameter dependence critical for robust design)
  2. Use for screening: parameters with S₁ < 5% can often be fixed at nominal values in expensive CFD or FEA workflows, reducing simulation cost by 40-60%
  3. Compare S₁ vs S_T for each input; large gaps indicate that input interacts significantly with others—essential for multi-material composite layup optimization
  4. In pharmaceutical manufacturing, high S₁₂ between temperature and pressure means these process parameters cannot be independently tuned; coupled control loops required