# How can we decompose the variance of the model output?

subject area
in short
prerequisite knowledge

For sensitivity analysis of probabilistic models, variance-based approaches are a popular choice. Such approaches assess how model parameters (or groups of model parameters) contribute to the variance of the model output. A decomposition of the variance of the model output is the foundation of such an analysis. The variance of the model output is decomposed into fractions, which can be attributed to individual model parameters or groups of model parameters.

## Decomposition

Let $h:\mathbf{X}\to Y$ be a model that maps the $M$-dimensional vector $\mathbf{X}$ of uncertain and statistically independent model input parameters $\{X_1,X_2,\ldots,X_M\}$ to scalar model output $Y$. The variance of the model output $Y$ can be decomposed as follows:
$$\operatorname{Var}\left[Y\right] = \sum_{i=1}^M V_i + \sum_{i<j}^M V_{ij} + \ldots + V_{12\ldots M}\;,$$ where $V_i$ is a first-order measure for the part of the variance $\operatorname{Var}\left[Y\right]$ that can be attributed to the uncertainty in $X_i$, $V_{ij}$ is the second-order effect, and so on.

## First-order effect

The first-order effect $V_i$ is defined as:
$$V_i = \operatorname{Var}_{X_i}\left[ \operatorname{E}_{\mathbf{X}_{\sim i}}\left[Y|X_i\right] \right]\;,$$ with $\operatorname{E}_{\mathbf{X}_{\sim i}}\left[Y|X_i\right]$ being the expected value of the model output with respect to all input variables except $X_i$ (which is fixed).

## Second-order effect

The second-order effect is $V_{ij}=V^c_{ij}-V_i-V_j$, with $V^c_{ij}$ as a measure for the part of the variance $\operatorname{Var}\left[Y\right]$ that can be attributed to the uncertainty in both $X_i$ and $X_j$:
$$V^c_{ij} = \operatorname{Var}_{X_i,X_j}\left[ \operatorname{E}_{\mathbf{X}_{\sim ij}}\left[Y|X_i,X_j\right] \right]\;.$$

## Input parameters must be statistically independent

Note that the above equation only holds if the model input parameters are statistically independent. If the input parameters are dependent, the individual terms in the expansion retain their meaning, however, the total sum will no longer be equal to the variance of the model output.

related articles