### Basics

Let’s say that we want to analyze how the output,

*How do we separate out the contribution of each of the parameters?*

### The One-at-a-Time Approach

Traditional *Sensitivity Analysis* approach, where one input variable

where

- OAT not fully explore the input space, and the unexplored space grows
- OAT does not consider parameters interactions
- OAT does not handle nonlinearity

There are, however, modifications to the OAT approach that extend extend it to be *global*, including the , but they still face limitations that have been discussed in literature.

### Variance Based Approach (Sobol)

Sobol’s *Sensitivity Analysis* is a form of variance-based sensitivity analysis, that ranks parameters based on the variance they contribute to the output. Here we are referring to variance as the **expected value of the squared deviation from the mean**. For a parameter

where

which will be critical to understanding Sobol’s method.

To understand Sobol’s method, we have to first start with *functional decomposition* or ANOVA decomposition, which stated that the function

written more explicitly it is:

The number of terms in total is

- Each term is
- The functions are orthogonal, or satisfy the unicity condition:
for- call this the ANOVA-decomposition terms having zero mean

With the assumptions in mind, the functions

**Note I removed

Variance can similarly be decomposed as:

where

### First-Order Effects

Re-arranging the above equations we also have:

which shows that the total variance in

Re-writing the equation for

For a global sensitivity analysis, we don’t want the variance at one point, but instead we want to attribute the variance caused by **expected** value of variance over all

Using the equality from above, we see that the first term in the above equation is the same as the first term in the integral form of

The left side of this equation is equivalent to

Remember that

The interpretation is that there are two loops, one to compute the integral over

If you look closely at the function, you will also notice that

From this representation, it is easy to derive the number of simulations needed for the sensitivity analysis. We simply “stack” the matrices to arrive at

#### Higher-Order Effects

So far we have been focused on **first-order variance**. It is the variance that

The total variance is a rather simple modification to the first order equations. Basically, instead of computing the variance induced by a parameter **all the other** first order variance and subtract that variance from the total. Its written as

The integral form is

and the Monte Carlo version

As compared to **except** for the **second order** sensitivity indicies:

### Re-Implementing in *Rust*

### References

- https://doi.org/10.1016/j.cpc.2009.09.018