# Dependency between uncertain parameters¶

One of the underlying assumptions when creating the polynomial chaos expansion is that the model parameters are independent. However, dependent parameters in neuroscience models are quite common (Achard and De Schutter, 2006). Fortunately, models containing dependent parameters can be analyzed with Uncertainpy by the aid of the Rosenblatt transformation from Chaospy (Rosenblatt, 1952; Feinberg and Langtangen, 2015). The idea is to use the Rosenblatt transformation to create a reformulated model $$\widetilde{U}(\boldsymbol{x}, t, \boldsymbol{R})$$, that takes an arbitrary independent parameter set $$\boldsymbol{R}$$ as input, instead of the original dependent parameter set $$\boldsymbol{Q}$$. We use the Rosenblatt transformation to transform from $$\boldsymbol{R}$$ to $$\boldsymbol{Q}$$, which makes it so $$\widetilde{U}$$ give the same output (and statistics) as the original model:

$\widetilde{U}(\boldsymbol{x}, t, \boldsymbol{R}) = U(\boldsymbol{x}, t, \boldsymbol{Q}).$

We can then perform polynomial chaos expansion as normal on the reformulated model, since it has independent parameters.

The Rosenblatt transformation $$T_{\boldsymbol{Q}}$$ transforms the random variable $$\boldsymbol{Q}$$ to the random variable $$\boldsymbol{H}$$, which in a statistical context behaves as if it were drawn uniformly from the unit hypercube $${[0, 1]}^D$$.

$T_{\boldsymbol{Q}}(\boldsymbol{Q}) = \boldsymbol{H}.$

Here, $$T_{\boldsymbol{Q}}$$ denotes a Rosenblatt transformation which is uniquely defined by $$\rho_Q$$ (the probability distribution of $$\boldsymbol{Q}$$). We can use the Rosenblatt transformation to transform from $$\boldsymbol{R}$$ to $$\boldsymbol{Q}$$ (through $$\boldsymbol{H}$$) to regain our original parameters:

$\begin{split}T_{\boldsymbol{Q}}(\boldsymbol{Q}) &= \boldsymbol{H} = T_{\boldsymbol{R}}(\boldsymbol{R}) \\ \boldsymbol{Q} &= T_{\boldsymbol{Q}}^{-1}(T_{\boldsymbol{R}}(\boldsymbol{R})).\end{split}$

Using this relation between $$\boldsymbol{R}$$ and $$\boldsymbol{Q}$$ in we can reformulate our model to take $$\boldsymbol{R}$$ as input, but still give the same results:

$U(\boldsymbol{x}, t, \boldsymbol{Q}) = U(\boldsymbol{x}, t, T_{\boldsymbol{Q}}^{-1}(T_{\boldsymbol{R}}(\boldsymbol{R}))) = \widetilde{U}(\boldsymbol{x}, t, \boldsymbol{R}).$

The statistical analysis can now be performed on this reformulated model $$\widetilde{U}$$ as before.