Statistics & probability

Sobol variance sensitivity indices calculator for a multivariate polynomial

Decompose the exact variance of a rational multivariate polynomial under independent uniform inputs into main and interaction Sobol contributions.

Your numbers

One rational-bound row per input; strict lower < upper.
Coefficient followed by one nonnegative exponent per variable; fractions such as 1/3 accepted.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Decompose the exact variance of a rational multivariate polynomial under independent uniform inputs into main and interaction Sobol contributions.

THE FORMULAV_u=Var(E[f|X_u])−Σ_{v⊊u}V_v; S_i=V_{i}/Var(f); S_Ti=1−Var(E[f|X_{−i}])/Var(f).

A worked example

For f=x+y+xy on independent unit uniforms, E[f]=5/4, Var(f)=55/144, each first-order index is 27/55 and each total-order index is 28/55.

Good to know

1–5 independent uniform inputs, up to 40 rational coefficient terms and total degree≤6. Exact rational finite-interval moments and subset decomposition; coefficient magnitudes≤1000000 and arithmetic growth cap. Zero variance rejected. No dependent inputs, arbitrary black boxes or Monte Carlo intervals.

Global variance is different from a derivative

A derivative describes local response near one input setting. A Sobol index instead asks how much output variance is associated with an uncertain input across its entire probability distribution. The result depends on both the model formula and the chosen distributions, so sensitivity is not an intrinsic property of a polynomial alone.

This calculator uses independent uniform inputs on entered finite intervals. Changing an interval can change the output variance and the ranking of inputs without changing any polynomial coefficients. The indices describe the modeled uncertainty, not causal importance, measurement quality or how easily an input could be controlled in practice.

Sobol variance sensitivity indices calculator for a multivariate polynomial worked examplex main: 27/55y main: 27/55Interaction: 1/55Variance = 55/144Total each: 28/55
Scroll across to see the full diagram.
For f=x+y+xy on independent unit uniforms, E[f]=5/4, Var(f)=55/144, each first-order index is 27/55 and each total-order index is 28/55.

Compare this with the Scalar ODE terminal-state parameter sensitivity calculator with an adjoint gradient. Partition output variance over independent uncertain inputs into main and interaction effects; the adjoint page returns a local terminal-state derivative at one parameter value.

Enter a polynomial rather than expression syntax

Each term consists of a rational coefficient followed by one exponent for every input. A row such as one, one, one represents the product of two variables with coefficient one. Repeated exponent rows are mathematically added, allowing an entered model to contain terms that combine or cancel exactly.

Bounds are supplied separately, one lower-upper row per variable. Finite decimals and integer fractions are converted to exact rational numbers; exponent notation is not accepted in this exact-input format. Exponents must be nonnegative integers and total degree is bounded to keep the complete moment and subset calculations tractable in the browser.

Integrate polynomial moments exactly

For a uniform variable on an interval, every integer-power expectation has a closed rational formula when the endpoints are rational. Independence turns a multivariate monomial expectation into a product of these one-variable moments. Expanding the polynomial and its square therefore gives an exact mean and variance within the supported arithmetic bounds.

Exact fractions are retained for the main results and sensitivity indices, while decimal values make the scale easier to read. This is not a random-sampling approximation, and no simulation standard error is attached. An arithmetic-growth cap rejects an excessively large exact computation rather than silently converting the proof-relevant fractions to rounded floating values.

Recover main and interaction components

For each subset of variables, the calculator integrates out the complementary variables and measures the variance of that conditional mean. These closed-subset variances include all effects inside the subset. Subtracting the contributions of proper subsets isolates the functional ANOVA component belonging to that exact combination of variables.

First-order indices contain one variable’s isolated contribution. Total-order indices include every component involving that variable, including interactions with other inputs. A difference between total and first order therefore indicates modeled interactions, not a numerical inconsistency. Summing total-order indices can exceed one because a shared interaction appears in more than one total.

Inspect the unit-square example

The default polynomial is x plus y plus their product, with both inputs independent and uniform between zero and one. Its mean is five quarters and its variance is fifty-five over one hundred forty-four. Symmetry makes the two first-order indices equal at twenty-seven over fifty-five.

Each total-order index is twenty-eight over fifty-five. Their small difference from the corresponding first-order value is the interaction fraction, one over fifty-five. The two first-order fractions and that one interaction sum exactly to one, giving a direct check that the component decomposition accounts for the entire modeled variance.

Handle constants and weak variance correctly

A constant polynomial has zero output variance. Dividing component variances by that value would not define a sensitivity index, so the calculator rejects the request instead of returning zero importance for every variable. Exact arithmetic also detects cancellation to a constant even when the input lists several apparently nonconstant terms.

A model with very small but nonzero rational variance remains mathematically distinguishable from a constant, subject to the supported fraction-growth bounds. Decimal displays may round such values strongly; inspect the exact fraction when the scale matters. Rescaling the whole output by a nonzero constant changes variance but leaves normalized Sobol indices unchanged.

Respect the independence assumption

The orthogonal functional ANOVA interpretation used here relies on independent inputs and the product probability measure. Feeding correlated uncertainty into the same bounds does not represent its dependence. Neither an input covariance matrix nor a conditional distribution is inferred from the polynomial, because the page has no data that identifies either one.

Useful validation identities include nonnegative component variances, exact reconstruction of total variance and zero contribution for an unused variable. Swapping the order of the input rows while permuting all exponent columns consistently must merely relabel the components. These checks support the calculation without extending its scope to correlated or nonuniform uncertainty models.

A few questions, answered

Why do total-order indices sum above one?

Interactions are included in the total index of every variable involved, so their contributions are counted more than once in that sum.

Does this use Monte Carlo sampling?

No. Supported rational polynomial moments and subset variance components are integrated exactly with rational arithmetic.

Can correlated inputs be entered?

No. Independent uniforms are part of the model; correlation requires a different decomposition and additional probability information.

What happens for a constant model?

Zero variance makes normalized indices undefined, so the page rejects the calculation rather than assigning invented values.

Find your calculator

Start typing to explore the library.