# Notation conditioned means for calculation variance based first and total order effect

Could someone maybe give an explanation and formulas in terms of sums or matrix operations for the calculation of variance based effects, and total effect indices?

The information given on Wikipedia: http://en.wikipedia.org/wiki/Variance-based_sensitivity_analysis uses some notation ($E_{\textbf{X}_{\sim i}}$,${X}_{\sim i}$) from which it is not clear to my how to interpret it.

$$V_{i} = \operatorname{Var}_{X_i} \left( E_{\textbf{X}_{\sim i}} (Y \mid X_{i}) \right) (1)$$

and $$S_{Ti} = \frac{E_{\textbf{X}_{\sim i}} \left(\operatorname{Var}_{X_i} (Y \mid \mathbf{X}_{\sim i}) \right)}{\operatorname{Var}(Y)} = 1 - \frac{\operatorname{Var}_{\textbf{X}_{\sim i}} \left(E_{X_i} (Y \mid \mathbf{X}_{\sim i}) \right)}{\operatorname{Var}(Y)} (2)$$

This paper tries to explain it, referring to (1), it is stated

where $X_i$ is the ith factor and $X_{\rm ∼i}$ denotes the matrix of all factors but $X_i$. The meaning of the inner expectation operator is that the mean of $Y$ is taken over all possible values of $X_{\rm ∼i}$ while keeping $X_i$ fixed. The outer variance is taken over all possible values of $X_i$.

but it remains difficult to understand, especially for $\left(\operatorname{Var}_{X_i} (Y \mid \mathbf{X}_{\sim i}) \right)$. How can I condition with respect to all variables except the ith, and take the variance for all possible values of $X_i$? How should I fix all $X_k$ except $X_i$ at a particular value? All at the same time, all separately?

The the Wikipedia entry and the paper continue with a very particular way to estimate the sensitivity indices, but I would like to have a general equation / expression that explains the idea and clarifies the notation, even though the operations might be computationaly not efficient.

If possible some think along the lines like the expression for conditioned mean or variance such as: -->
$$\sigma^2_{X|Y=y_j} = \frac 1 n_{.j} \sum_{i=1}^H (x_i - \mu_{X|Y=y_j})^2 n_{ij} = \frac 1 n_{.j} \sum_{i=1}^H x_j^2n_{ij} - \mu_{X|Y=y_j}^2$$ but then corresponding the notation given for ($E_{\textbf{X}_{\sim i}}$,${X}_{\sim i}$)?

EDIT: (since there are no responses since some weeks), is it a silly question? is it to difficult? is it to easy? to me the explanation about the topic in Wikipedia is like explaining the concept of square root, by only showing "Heron's method". I think a conceptual explanation could really be helpful.