A scientific simulation rarely receives perfectly known inputs. Material properties come from measurements with error bars. Boundary conditions vary between experiments. Initial states may be only partially observed. Numerical models also simplify physical processes that cannot be represented in complete detail.
Uncertainty quantification, commonly shortened to UQ, studies how these uncertainties affect simulation predictions. Sensitivity analysis asks which uncertain inputs are responsible for the observed changes in the output.
The two disciplines support different decisions. UQ may show that a predicted peak temperature lies within a broad interval. Sensitivity analysis may reveal that most of this interval is caused by uncertainty in thermal conductivity rather than heat capacity or boundary temperature.
Used together, they help researchers report credible prediction intervals, prioritize new measurements, simplify models, and design more efficient simulation campaigns.
What Is Uncertainty Quantification?
Consider a computational model:
Y = M(X)
The vector X contains uncertain inputs, while Y is a predicted quantity of interest. Examples of Y include maximum stress, reaction yield, temperature, crack length, wave arrival time, or pressure drop.
UQ assigns mathematical descriptions to the uncertain inputs and propagates them through the model. The result may include:
- Expected value
- Variance and standard deviation
- Quantiles
- Prediction or credible intervals
- Probability of exceeding a safety threshold
- Complete output probability distributions
UQ does not automatically prove that a model is correct. It describes the consequences of specified uncertainty assumptions. Incorrect distributions, missing uncertainty sources, or an invalid physical model can still produce misleading intervals.
What Is Sensitivity Analysis?
Sensitivity analysis measures how changes in model inputs affect an output. It can answer questions such as:
- Which parameters contribute most to output variance?
- Which inputs have almost no effect?
- Are interactions between parameters important?
- Which measurement should be improved first?
- Can the model be reduced without changing its predictions?
A parameter can have a wide uncertainty range but little effect on the output. Another parameter may be known quite precisely but have a strong physical influence. Sensitivity depends on both the model response and the assumed input uncertainty.
UQ in the VVUQ Framework
Verification, validation, and uncertainty quantification form a connected credibility framework:
- Verification: Are the equations implemented and solved correctly?
- Validation: Does the model represent the real system adequately for its intended use?
- Uncertainty quantification: How do uncertain inputs, model assumptions, and other uncertainty sources affect predictions?
Sensitivity analysis supports this framework by identifying which assumptions and parameters most influence the quantities used in a decision.
The ASME VVUQ standards portfolio provides domain-specific guidance for assessing the credibility of computational models. The related MatForge guide on verification and validation in scientific simulations explains the broader process.
Sources of Uncertainty
A useful UQ study begins with an uncertainty inventory. Researchers should identify where uncertainty enters the model before selecting a numerical method.
Aleatory Uncertainty
Aleatory uncertainty represents inherent variability in a population or process. Examples include variation in grain sizes, random loading, manufacturing tolerances, or environmental conditions.
This variability is not removed by measuring one sample more precisely. It is commonly represented with probability distributions estimated from repeated observations.
Epistemic Uncertainty
Epistemic uncertainty represents incomplete knowledge. Examples include poorly measured parameters, unknown boundary conditions, limited experimental data, or an uncertain constitutive law.
It may be reduced through new experiments, improved sensors, additional theory, or a more detailed model. A probability distribution can be used when enough information exists, but intervals, ensembles, probability boxes, or other imprecise representations may be more defensible when data is weak.
Model-Form Uncertainty
Model-form uncertainty arises because the equations omit or simplify real physical processes. A turbulence closure, reaction mechanism, contact law, or reduced-order constitutive model may remain imperfect even when its parameters are known.
Input propagation alone does not capture model-form uncertainty. Researchers may need multiple model forms, discrepancy terms, validation data, or expert judgment.
Numerical Uncertainty
Discretization, iterative tolerances, surrogate error, and sampling error also affect reported predictions. These should not be mixed silently with physical parameter uncertainty.
Mesh and time-step convergence should normally be established before a large UQ campaign. Otherwise, the study may propagate uncertain inputs through a solution that is not numerically converged.
The National Academies discussion of uncertainty quantification emphasizes identifying and characterizing uncertainty sources as part of credible computational prediction.
A General UQ Workflow
- Define the prediction or decision quantity.
- Verify the computational implementation.
- Assess numerical convergence.
- List uncertain parameters, boundary data, and model assumptions.
- Separate aleatory, epistemic, model-form, and numerical uncertainty where possible.
- Assign justified ranges, distributions, or bounds.
- Select a sampling or surrogate method.
- Run the computational campaign.
- Estimate output statistics and sensitivity measures.
- Validate the surrogate and check convergence of the UQ estimates.
- Report assumptions, failures, and limitations.
Monte Carlo and Quasi-Monte Carlo
Monte Carlo propagation is the general baseline. Samples are drawn from the joint input distribution, the simulation is evaluated for each sample, and output statistics are estimated from the resulting ensemble.
Its main advantage is flexibility. It does not require the response to be smooth or polynomial-like. It can be applied to discontinuous outputs, threshold events, and complex black-box models.
Its main limitation is slow statistical convergence. The standard error of an ordinary Monte Carlo estimate typically decreases proportionally to:
N^(-1/2)
Quasi-Monte Carlo uses low-discrepancy sequences to cover parameter space more evenly. Randomized quasi-Monte Carlo can also support uncertainty estimates while often improving practical convergence for sufficiently regular integrands.
Sampling strategies including Monte Carlo, Latin hypercube sampling, Sobol sequences, and randomized QMC are covered in the Monte Carlo methods guide.
Polynomial Chaos Expansion
Polynomial chaos expansion approximates the model output as a sum of orthogonal polynomials of the uncertain inputs:
Y(X) ≈ Σ cₖ Ψₖ(X)
The basis functions Ψₖ are selected to be orthogonal with respect to the input probability distributions. Legendre polynomials are commonly associated with uniform inputs, while Hermite polynomials are associated with Gaussian inputs.
The coefficients cₖ can be estimated through regression, quadrature, projection, or an intrusive reformulation of the governing equations.
Non-Intrusive PCE
A non-intrusive PCE treats the simulator as a black box. The workflow is:
- Select a polynomial basis.
- Generate training or quadrature points.
- Run the original simulator at those points.
- Estimate the expansion coefficients.
- Validate the expansion on independent points.
This approach can be added around an existing CFD, finite element, phase-field, or molecular model without changing its internal equations.
Intrusive PCE
An intrusive formulation substitutes the expansion into the governing equations and derives a coupled deterministic system for the coefficients.
It can be efficient for suitable equations but requires major changes to the solver. The coupled system may also become large and difficult to precondition.
When PCE Is Effective
PCE can converge rapidly when the model response varies smoothly with the uncertain inputs and the effective parameter dimension is modest.
It should not be described with one universal speedup factor. The number of required simulations depends on:
- Number of uncertain parameters
- Polynomial order
- Strength of parameter interactions
- Smoothness of the response
- Regression or quadrature strategy
- Desired accuracy
- Quality of the experimental design
For discontinuous responses, bifurcations, contact changes, threshold events, or solver failures, a global polynomial expansion may converge slowly or create oscillatory artifacts.
The Curse of Dimensionality
A total-degree polynomial basis of order p in d uncertain parameters contains:
Number of terms = (d + p)! / (d! p!)
For 20 parameters and order three, this produces 1,771 terms. A stable regression usually requires more training points than coefficients, so the computational demand can quickly become impractical.
The number of parameters alone is not the complete issue. A nominally high-dimensional model may still have low effective dimension if only a few parameters or interactions control the response.
Sparse Polynomial Chaos
Sparse PCE reduces the number of candidate basis terms or selects only terms supported by the available data.
Common approaches include:
- Hyperbolic truncation, which penalizes high-order interaction terms
- Least-angle regression
- LASSO or other regularized regression
- Compressive sensing
- Adaptive basis enrichment
- Smolyak sparse quadrature grids
Sparse methods can extend PCE to larger parameter sets, but they do not eliminate dimensionality problems automatically. Their success depends on coefficient sparsity and low-order interactions.
The PTB best-practice guide discusses polynomial chaos, sparse grids, and dimensionality considerations in uncertainty analysis.
Statistics and Sensitivity From PCE
When the basis is orthonormal, output moments can be obtained directly from the expansion coefficients.
The constant coefficient gives the mean:
E[Y] = c₀
The variance is the sum of squared non-constant coefficients:
Var[Y] = Σ cₖ²
Sobol indices can be calculated by grouping coefficients according to the variables present in each polynomial term. This requires no additional expensive evaluations of the original simulation after the PCE has been fitted.
The sensitivity calculation is inexpensive, but the PCE itself must first be shown to approximate the model accurately.
Stochastic Collocation
Stochastic collocation evaluates the deterministic simulator at selected points in uncertainty space and constructs an interpolating or projection-based approximation.
Gaussian quadrature can work well in low dimensions. Sparse grids reduce the growth in the number of multidimensional points. Adaptive grids add points where the response requires greater resolution.
Ordinary Sobol or Latin hypercube samples are useful for regression-based surrogates, but they should not be confused with classical quadrature collocation rules.
Surrogate-Based UQ
When one high-fidelity simulation takes hours or days, a surrogate may be necessary. A surrogate is trained on a limited set of expensive simulations and then evaluated cheaply during uncertainty propagation.
Common choices include:
- Polynomial response surfaces
- Polynomial chaos expansions
- Gaussian process or kriging models
- Radial basis functions
- Reduced-order models
- Neural-network surrogates
A surrogate adds a new uncertainty source: approximation error. It must be validated on points that were not used during training.
The machine learning surrogates guide explains model selection and validation in greater detail.
Local and Global Sensitivity Analysis
Local sensitivity analysis examines derivatives near one reference state:
∂Y / ∂Xᵢ
It is useful for gradient-based optimization, calibration, and small perturbations. It may miss nonlinear behavior and interactions elsewhere in the parameter space.
Global sensitivity analysis varies inputs across their full assigned ranges or distributions. It is better suited to nonlinear models and uncertainty attribution.
Sobol Sensitivity Indices
Sobol analysis decomposes output variance into contributions from individual parameters and their interactions.
The first-order index is:
Sᵢ =
Var(E[Y | Xᵢ])
/ Var(Y)
It measures the variance explained by parameter Xᵢ alone.
The total-order index includes the parameter and every interaction involving it:
S_Tᵢ =
1 - Var(E[Y | X₋ᵢ])
/ Var(Y)
A large difference between total-order and first-order indices suggests that interactions are important.
Classical Sobol decomposition usually assumes independent input variables. Dependent inputs require modified methods or transformations, and their indices must be interpreted differently.
Morris Screening
The Morris method is an economical screening technique. It calculates elementary effects along multiple trajectories in the input space.
Two common summaries are:
μ*, the mean absolute elementary effect, used as an importance measureσ, the spread of the effects, indicating nonlinearity, interactions, or both
Morris does not provide a direct decomposition of output variance. Its purpose is to separate clearly unimportant inputs from parameters that require more detailed analysis.
FAST and Other Methods
The Fourier Amplitude Sensitivity Test assigns frequencies to input variation and estimates variance contributions from the Fourier spectrum of the model response.
Other methods serve different goals:
- RBD-FAST for efficient first-order analysis
- PAWN for distribution-based sensitivity
- Delta moment-independent measures
- Derivative-based global sensitivity measures
- Standardized regression coefficients for approximately linear models
No sensitivity measure is universally best. The method should match the model cost, dependence structure, nonlinearity, and scientific question.
Python Tools for UQ and Sensitivity
| Library | Main Focus | Typical Use |
|---|---|---|
| UQpy | General uncertainty methods | Sampling, reliability, PCE, surrogates, sensitivity, and stochastic processes |
| Chaospy | Probability distributions and polynomial chaos | Orthogonal expansions, quadrature, regression, moments, and Sobol indices |
| SALib | Global sensitivity analysis | Sobol, Morris, FAST, RBD-FAST, PAWN, delta, and related methods |
| SMT | Surrogate modeling | Kriging, radial basis functions, polynomial models, derivatives, and multi-fidelity methods |
| Uncertainpy | Black-box UQ and feature analysis | PCE, quasi-Monte Carlo, sensitivity, and dependent-parameter transformations |
The ecosystem is specialized rather than strictly all-in-one. A project may use SALib for screening, Chaospy or UQpy for PCE, and SMT for an expensive-model surrogate.
A PCE Example With Chaospy
The following example fits a polynomial approximation of a two-input model by regression:
import chaospy as cp
import numpy as np
# Independent uncertain parameters
distribution = cp.J(
cp.Uniform(0.8, 1.2),
cp.Normal(2.0, 0.1)
)
# Total-degree polynomial basis
order = 3
expansion = cp.generate_expansion(
order,
distribution
)
# Experimental design
sample_count = 100
samples = distribution.sample(
sample_count,
rule="sobol"
)
def model(sample):
conductivity = sample[0]
source_strength = sample[1]
return (
source_strength
/ conductivity
+ 0.2 * conductivity ** 2
)
evaluations = np.array([
model(samples[:, index])
for index in range(sample_count)
])
# Fit non-intrusive PCE by regression
approximation = cp.fit_regression(
expansion,
samples,
evaluations
)
mean = cp.E(
approximation,
distribution
)
variance = cp.Var(
approximation,
distribution
)
first_order = cp.Sens_m(
approximation,
distribution
)
total_order = cp.Sens_t(
approximation,
distribution
)
print("Mean:", float(mean))
print("Standard deviation:", float(np.sqrt(variance)))
print("First-order Sobol indices:", first_order)
print("Total-order Sobol indices:", total_order)
This calculation is meaningful only after the polynomial approximation has been checked on independent validation samples.
A Sobol Example With SALib
import numpy as np
from SALib.sample import sobol as sobol_sample
from SALib.analyze import sobol as sobol_analyze
problem = {
"num_vars": 3,
"names": [
"conductivity",
"heat_capacity",
"source_strength"
],
"bounds": [
[0.8, 1.2],
[0.9, 1.1],
[1.5, 2.5]
]
}
parameter_values = sobol_sample.sample(
problem,
N=1024,
calc_second_order=False,
seed=42
)
def model(parameters):
conductivity = parameters[0]
heat_capacity = parameters[1]
source_strength = parameters[2]
return (
source_strength
/ (conductivity * heat_capacity)
+ 0.1 * conductivity ** 2
)
outputs = np.array([
model(parameters)
for parameters in parameter_values
])
indices = sobol_analyze.analyze(
problem,
outputs,
calc_second_order=False,
print_to_console=False
)
for index, name in enumerate(problem["names"]):
print(name)
print(" First order:", indices["S1"][index])
print(" Total order:", indices["ST"][index])
The sample count used by a Sobol design is larger than the base value N. It depends on the number of variables and whether second-order indices are requested.
Validating a Surrogate or PCE
A surrogate should not be judged only by its training error. Use independent validation points and examine:
- Root mean squared error
- Maximum error
- Relative error near important thresholds
- Coverage of predicted intervals
- Residual patterns
- Accuracy of moments and quantiles
- Stability of sensitivity rankings
Cross-validation can support model selection, but a final untouched test set remains valuable.
If a surrogate is inaccurate in a small region with a high failure probability or safety consequence, a low global mean error may still be unacceptable.
Choosing a Method
| Model Characteristic | Possible Starting Point | Main Caution |
|---|---|---|
| Smooth response with few influential parameters | PCE or stochastic collocation | Validate polynomial order and experimental design |
| Moderate nominal dimension with sparse interactions | Sparse PCE or adaptive sparse grid | Sparsity must be demonstrated rather than assumed |
| Discontinuous or threshold response | Monte Carlo, randomized QMC, or a local surrogate | Global polynomials may converge poorly |
| Very expensive simulator | Kriging, reduced-order model, or multi-fidelity surrogate | Include surrogate error in the analysis |
| Many inputs requiring initial ranking | Morris screening | Results are qualitative rather than variance fractions |
| Need quantitative variance attribution | Sobol or FAST | Sampling cost can be high |
| Strongly dependent parameters | Dependence-aware sampling and sensitivity methods | Classical independent-input Sobol interpretation may fail |
| Poorly characterized epistemic uncertainty | Intervals, ensembles, or imprecise probability methods | A precise distribution may imply unsupported knowledge |
Common Mistakes
- Beginning with a large UQ campaign before verifying numerical convergence
- Assigning distributions without data or documented expert judgment
- Treating aleatory and epistemic uncertainty as interchangeable
- Ignoring model-form uncertainty
- Using a full polynomial basis in a high-dimensional problem without checking basis size
- Assuming sparse PCE will work for every 20- or 50-parameter model
- Reporting PCE moments without validating the surrogate
- Using classical Sobol indices for dependent inputs without modification
- Confusing Morris screening measures with variance contributions
- Reporting sensitivity indices without confidence intervals
- Discarding failed simulations without investigating the failure region
- Mixing sampling error, surrogate error, and numerical discretization error
- Reporting a universal speedup for one UQ method
A Reproducible UQ Campaign
A publication-ready study should record:
- Model and software versions
- Input distributions, bounds, correlations, and supporting evidence
- Random seeds and sampling method
- Number of samples or training simulations
- Polynomial order or surrogate hyperparameters
- Regression and regularization method
- Validation design
- Solver failures and excluded runs
- Confidence intervals for estimated statistics
- Convergence checks for moments and sensitivity indices
The reproducible parameter sweeps guide provides a useful structure for planning and documenting these campaigns.
Materials Modeling Example
Consider a phase-field model with uncertain mobility, interfacial energy, diffusivity, initial composition, and cooling rate.
A practical workflow could be:
- Verify spatial and temporal convergence of the deterministic solver.
- Define distributions from experiments or literature.
- Use Morris screening to identify influential parameters.
- Build a PCE or kriging surrogate using the reduced input set.
- Validate the surrogate against independent phase-field runs.
- Estimate uncertainty in grain size, phase fraction, or solidification time.
- Calculate Sobol indices.
- Prioritize new measurements for the parameters driving the largest variance.
The introduction to materials modeling provides background on the computational models that can be embedded in such a workflow.
Related Guides
- Monte Carlo Methods for Scientific Simulations — Compare random sampling, QMC, LHS, and convergence behavior.
- Verification vs. Validation in Scientific Simulations — Place UQ within a complete model credibility process.
- Reproducible Parameter Sweeps — Plan simulation campaigns and preserve complete experimental records.
- Machine Learning Surrogates for Scientific Simulations — Build and validate inexpensive approximations of costly models.
- When to Use FEM, FVM, or FDM — Select the deterministic numerical method underlying the UQ study.
Further Reading
- ASME Verification, Validation, and Uncertainty Quantification
- National Academies: Uncertainty Quantification
- PTB Best Practice Guide for Uncertainty Quantification
- UQpy Documentation
- Chaospy Documentation
- SALib Documentation
- Surrogate Modeling Toolbox Documentation
- Uncertainpy Documentation
Conclusion
Uncertainty quantification converts uncertain simulation inputs into distributions, intervals, or probabilities for predicted outputs. Sensitivity analysis explains which inputs and interactions are responsible for those results.
Monte Carlo remains the most general propagation method. Polynomial chaos and stochastic collocation can be more efficient for smooth, low-effective-dimensional models. Sparse expansions and surrogate models can extend these methods to more expensive or moderately higher-dimensional applications, but they require careful validation.
Sobol indices provide quantitative variance attribution, while Morris offers economical early-stage screening. SALib, UQpy, Chaospy, SMT, and Uncertainpy support different parts of this workflow rather than one identical set of capabilities.
A credible UQ study begins before sampling. It identifies uncertainty sources, verifies numerical convergence, justifies distributions, validates surrogates, measures estimation error, and reports every important assumption.
The purpose is not to attach error bars mechanically. It is to understand what controls the prediction, how much confidence the available evidence supports, and which action would most effectively reduce uncertainty.