The integrals defining Sobol indices cannot be evaluated analytically for most computational models. Monte Carlo estimation provides a practical approach. The first-order index can be expressed as
where denotes the expected output when is fixed and all other parameters vary. The outer variance operator measures how this conditional expectation varies as changes. Similarly, the total-effect index is
representing the expected variance remaining when all parameters except are fixed.
Direct Monte Carlo evaluation of these conditional expectations requires nested sampling loops, which rapidly becomes computationally prohibitive. Saltelli proposed an efficient sampling scheme that circumvents nested loops. The method generates two independent sample matrices and , each of size , where each row represents one parameter set sampled from the joint distribution. For each parameter , a hybrid matrix is constructed by copying and replacing its -th column with the corresponding column from . The model is evaluated at all sample points to obtain response vectors , , and for .
Using these evaluations, the first-order index is estimated as
and the total-effect index as
Computing indices for all parameters requires model evaluations, see \citet{Saltelli2002MakingBest}. When is chosen to be several thousand, this becomes expensive for models requiring substantial computational time per evaluation. Surrogate models that approximate the original model with negligible evaluation cost make Sobol analysis tractable for such cases, \citep{Saltelli2008GlobalSA}.
Many computational models produce time-dependent or spatially distributed outputs rather than scalar responses. A dynamic simulation generates a time series for . A spatial model produces a field over a domain. The standard Sobol indices defined for scalar outputs do not directly apply.
The most straightforward extension computes Sobol indices pointwise. For a time series, indices are calculated separately at each time instant:
This produces time-varying sensitivity profiles revealing which parameters dominate at different stages of the process. Early-time sensitivity may differ from late-time behavior. Pointwise indices are computed independently at each time step using the same sample matrices , , and , with model evaluations providing response time series rather than scalars.
For applications requiring a single global importance measure across time, pointwise indices can be aggregated. Common approaches include averaging indices over time, integrating them against a weight function that emphasizes critical time windows, or extracting maximum values to identify peak sensitivity. The choice depends on whether early-time, late-time, or transient behavior matters most for the application. In cases where the entire time evolution matters equally, simple averaging provides a reasonable summary.