# Notation convention Let start by discussing the definition of a correlation matrix that connect (or not) a variable with the others. For a given problem with $n_{X}$ variables, the covariance between two variables (denoted ${\rm Cov}(X_i,X_j)$) and their linear correlation (denoted $\rho_{X_{i}X_{j}}$) can be estimated as **{eq}`eq_rhoxixjdef`: Covariance and correlation between two variables** ```{math} :label: eq_rhoxixjdef {\rm Cov}(X_i,X_j) = \, \mathrm{I\!E}\left[(x_i-\mu_i)(x_j-\mu_j)\right] \;\; {\rm and } \;\; \rho_{X_{i}X_{j}} = \frac{{\rm Cov}(X_i,X_j)}{\sigma_{X_i}\sigma_{X_j}} ``` In the equation above $\mu$ and $\sigma$ are respectively the mean and standard deviation of the random variable under consideration. The coefficients that should be provided by the user are the correlation one, called the Pearson ones (as they've been estimated using values of the random variables, but this is further discussed at the end of this section and also in [](#sensitivity_brief_reminder_theoretical_theoretical_aspects)). The idea is to gather all these coefficients in matrix, called hereafter the correlation matrix, that can be written as ```{math} \mathbf{C}(n_{X},n_{X})= \left ( \begin{array}{cccc} 1 & \rho_{X_{1}X_{2}} & \cdots & \rho_{X_{1}X_{n_{X}}}\\ \rho_{X_{2}X_{1}} & 1 & \cdots & \rho_{X_{2}X_{n_{X}}}\\ \vdots & \vdots & \ddots & \vdots \\ \rho_{X_{n_{X}}X_{1}} & \rho_{X_{n_{X}}X_{2}} & \cdots & 1 \\ \end{array} \right) ``` Depending on the reference, one can discuss either the correlation matrix ($\mathbf{C}$) or the covariance matrix ($\mathbf{C_{o}}$). Going from one to the other is trivial if one defines $\mathbf{D}$ the diagonal matrix of dimension $n_{X}$ whose coefficients are the standard deviation of the random variables, then ```{math} \mathbf{C} = \mathbf{D}^{-1} \; \mathbf{C_{o}} \, \mathbf{D}^{-1} \;\; \Leftrightarrow \;\; \mathbf{C_{o}} = \mathbf{D} \; \mathbf{C} \, \mathbf{D} ```