# Linear correlations in reliability analysis

**URL:** <https://uqworld.org/t/linear-correlations-in-reliability-analysis/490>\
**Category:** Community Q&A and How To\
**Tags:** reliability\
**Created:** [February 4, 2020, 4:28pm UTC](https://uqworld.org/t/linear-correlations-in-reliability-analysis/490 "2020-02-04T16:28:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![San](https://uqworld.org/letter_avatar_proxy/v4/letter/s/ba9def/32.png) [@San](https://uqworld.org/u/San)\
**Post date:** [February 4, 2020, 4:28pm UTC](https://uqworld.org/t/linear-correlations-in-reliability-analysis/490/1 "2020-02-04T16:28:39Z")

</div>

Hi

This must be very simple, but as a new user I am unable to find information on reliability analysis of correlated variables (not using copula functions).  
How would I enter linear correlation coefficient for Gaussian and NonGaussian variables in a FORM/SORM/MCS analysis?  
For example, line 67 of ‘UQLab\Examples\Reliability\uq\_Example\_Reliability\_03\_Oscillator.m’, considers independent lognormal variables, how can I calculate beta if the variables are corrleated?

Regards  
San

---

<div class="post-metadata">

**Author:** ![bsudret](https://uqworld.org/user_avatar/uqworld.org/bsudret/32/224_2.png) [@bsudret](https://uqworld.org/u/bsudret)\
**Post date:** [February 5, 2020, 2:54pm UTC](https://uqworld.org/t/linear-correlations-in-reliability-analysis/490/2 "2020-02-05T14:54:36Z")

</div>

Hi San

Welcome on UQWorld!

There are two questions, I think. One is "how to define a probabilistic model that includes dependence between random variables of given marginal distributions and given linear correlations? ". The second is “how to do this with UQLab?”.

When writing the reply, I realized there are many aspects. So I moved my reply into this post on [Linear correlation, dependence, copulas, Nataf distribution and all that stuff](https://uqworld.org/t/linear-correlation-dependence-copulas-nataf-distribution-and-all-that-stuff/493).

thanks for initiating the discussion!  
Best regards  
Bruno

---

<div class="post-metadata">

**Author:** ![San](https://uqworld.org/letter_avatar_proxy/v4/letter/s/ba9def/32.png) [@San](https://uqworld.org/u/San)\
**Post date:** [February 5, 2020, 4:24pm UTC](https://uqworld.org/t/linear-correlations-in-reliability-analysis/490/4 "2020-02-05T16:24:25Z")

</div>

Thank you Prof Sudret for a detailed response. I am sure this discussion will be very relevant for future users. I understand the rationale behind the adoption of copula mechanism in UQLab.

The most important point for me here is “So there is no reason not to pretend that you choose the rank correlations as opposed to the linear correlations.”- I am unclear how we implement this in practice. As you know for most of the structural engineering problems, we have very limited data and traditionally we have extracted linear correlations (rho). Now,  
i) are we saying that for nonGaussian distributions (without enough data) we need to make expert judgement and equate rho to rank measures (as appropriate)?  
ii) how accurate such an assumption would be?

Kind regards  
San

---

<div class="post-metadata">

**Author:** ![bsudret](https://uqworld.org/user_avatar/uqworld.org/bsudret/32/224_2.png) [@bsudret](https://uqworld.org/u/bsudret)\
**Post date:** [February 7, 2020, 8:08am UTC](https://uqworld.org/t/linear-correlations-in-reliability-analysis/490/5 "2020-02-07T08:08:25Z")

</div>

Dear San

As soon as you have data (even few points) you can easily compute the _Spearman rank correlation_, as easily as the Pearson linear correlation.

- you first compute the rank of each point in the sample set, i.e. its position in the sorted sample. For instance, if

\mathcal{X} = \{0.5 \quad 0.6 \quad 0.3 \quad 0.12 \quad 0.56 \quad 0.45 \quad 0.14 \quad 0.58 \quad 0.65 \quad 0.77 \}

then the ranks of the values are: r\_{\mathcal X} = \{ 5 \; 8 \; 3 \; 1 \; 6 \; 4 \; 2 \; 7 \; 9 \; 10\}, that is 0.12 has rank 1 as it is the smallest value of the sample, whereas 0.65 has rank 9 since it is the second largest value.

- Once you have the ranks r\_{{\mathcal X}\_i} and r\_{{\mathcal X}\_j} of samples \mathcal{X}\_i and \mathcal{X\_j} (from two correlated parameters X\_i and X\_j), Spearman’s rank correlation is simply the **linear** correlation between the ranks:

\rho\_S(\mathcal{X}\_i, \, \mathcal{X}\_j) = \rho(r\_{{\mathcal X}\_i}, r\_{{\mathcal X}\_j}).

So why not do it and use the result to parametrize a Gaussian copula?  
Best regards  
Bruno
