2.7. RV: Random Variables

The RV tab allows the user to specify the probabilistic distribution for the random problem at hand. The following probabilistic distributions for the random variables are currently supported:

2.7.1. Probability distribution

Note

To add a new random variable the user presses the Add button. To remove a random variable, the user must first select it by checking the small circle before the random variable, and then pressing the Remove button.

2.7.1.1. Dakota Engine

The following ten distribution classes are supported for the Dakota UQ engine.

  1. Normal (Gaussian)

    The user provides the mean (\(\mu\)) and standard deviation (\(\sigma\)) of the normal distribution. The density function of the normal distribution, as a function of \(\mu\) and \(\sigma\) is:

    (2.7.1.1.1)\[f(x) = \frac{1}{\sqrt{2 \pi} \sigma} \exp \left( -{\frac{1}{2} \left( \frac{x - \mu}{\sigma} \right)^2} \right)\]
  2. Lognormal

    The user provides the mean (\(\mu\)) and standard deviation (\(\sigma\)) of the lognormal distribution. The density function of the lognormal distribution, as a function of \(\mu\) and \(\sigma\) is:

    (2.7.1.1.2)\[f(x) = \frac{1}{\sqrt{2 \pi} \zeta x} \exp \left( -{\frac{1}{2} \left( \frac{\ln x - \lambda}{\zeta} \right)^2} \right)\]

    where \(\zeta^2 = \ln \left( \frac{\sigma^2}{\mu^2} + 1 \right)\) and \(\lambda = \ln(\mu) - \frac{\zeta^2}{2}\)

  3. Beta

    The user provides \(\alpha\), \(\beta\), lower bound (\(L_B\)), and an upper bound (\(U_B\)) for the beta distribution. The density function of the normal distribution, as a function of these quantities, is:

    (2.7.1.1.3)\[f(x) = \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta)} \frac{(x - L_B)^{\alpha-1}(U_B-x)^{\beta-1}}{(U_B - L_B)^{\alpha + \beta - 1}}\]

    where \(\Gamma(\alpha)\) is the Gamma function.

  4. Uniform

    The user provides the lower bound (\(L_B\)), and an upper bound (\(U_B\)) for the uniform distribution. The density function of the normal distribution, as a function of these quantities, is:

    (2.7.1.1.4)\[f(x) = \frac{1.0}{(U_B - L_B)}\]

    The mean of the distribution is \(\frac{(U_B + L_B)}{2.0}\)

  5. Weibull

    The user provides the shape parameter (\(k\)) and scale parameter (\(a_n\)) for the Weibull distribution. The density function of the Weibull distribution, as a function of these quantities, is:

    (2.7.1.1.5)\[f(x) = \frac{k}{a_n}\left(\frac{x}{a_n}\right)^{k-1} \exp \left( -(x/a_n)^{k} \right)\]

    where \(k,a_n > 0\) and \(x \geq 0\). For \(x<0\), \(f(x) = 0\).

  6. Gumbel

    The user provides \(\alpha\) and \(\beta\) for the Gumbel distribution, where \(\beta\) is known as the location parameter and \(\frac{1}{\alpha}\) the scale parameter. The density function of the Gumbel distribution, as a function of these quantities, is:

    (2.7.1.1.6)\[f(x) = \alpha e^{-\alpha(x-\beta)} \exp(-e^{-\alpha(x-\beta)})\]
  7. Exponential

    The user provides the parameter (\(\lambda\)) of the exponential distribution. The density function of the exponential distribution, as a function of \(\lambda\), is:

    (2.7.1.1.7)\[f(x) = \lambda \exp(-\lambda x)\]

    where \(x>0\) and \(\lambda>0\). The user can alternatively provide the mean (\(m\)) of the exponential distribution.

    (2.7.1.1.8)\[m = \frac{1}{\lambda}\]
  8. Discrete

    The user provides the \(N\) discrete values (\(x_i\)) and their weights (probability \(p_i\)) for a multinomial distribution. The probability mass function of the discrete distribution is:

    (2.7.1.1.9)\[\begin{split}p(x)=\begin{cases} p_i, & \text{if $x=x_i$}\\ 0, & \text{otherwise} \end{cases}\end{split}\]

    where \(p_i>0\). The weights (\(p_i\)) will be automatically normalized if they do not sum up to one. The option to define by moments is not supported for the discrete distribution.

  9. Gamma

    The user provides the shape parameter (\(k\)) and scale parameter (\(\lambda\)) of the Gamma distribution. The density function of the Gamma distribution, as a function of \(k\) and \(\lambda\), is:

    (2.7.1.1.10)\[f(x) = \frac{\lambda^kx^{k-1}\exp(-\lambda x)}{\Gamma(k)}\]

    where \(\lambda>0\) and \(k>0\). Users can alternatively provide the mean (\(m\)) and standard deviation (\(\sigma\)).

    (2.7.1.1.11)\[\begin{split}m &= \frac{k}{\lambda} \\ \sigma &= \sqrt{\frac{k}{\lambda^2}}\end{split}\]
  10. Chi-squared

The user provides the parameter \(k\) of the Chi-squared distribution. The density function of the Chi-squared distribution, as a function of \(k\), is

(2.7.1.1.12)\[f(x) = \frac{1}{2^{\frac{k}{2}}\Gamma\left(\frac{k}{2}\right)}x^{\left(\frac{k}{2}-1\right)} \exp\left(-\frac{x}{2}\right)\]

where \(x>0\) and \(k\) is a natural number. Users can alternatively select the moment option where the mean (\(m\)) is

(2.7.1.1.13)\[m = k\]

For each random variable, the user must enter a name and select from the drop-down menu the distribution associated with the random variable. For the distribution selected, the user must then provide the input arguments, which are as described above. Fig. 2.7.1.1.1 shows the panel for a problem with four Random Variables with all random input following Gaussian distributions.

../../../../_images/rv.png

Fig. 2.7.1.1.1 Random variable specification.

Note

To add a new random variable the user presses the Add button. To remove a random variable, the user must first select it by checking the small circle before the random variable, and then pressing the Remove button.

Warning

Removing a random variable may have unintended consequences and cause the UQ engine to fail.

../../../../_images/rvplot.png

Fig. 2.7.1.1.2 Distributions offered by the HydroUQ app.

2.7.1.2. SimCenterUQ Engine

One additional distribution is supported in the SimCenter UQ engine. The users can also define distributions either by Parameters, Moments or Dataset. (Note: Nataf transform module developed by [ERA19] is adopted)

  1. Truncated exponential

    The user provides the parameter \(k\) and bounds \(L_B\) and \(U_B\) for the truncated exponential distribution. The density function of the truncated exponential distribution is

    (2.7.1.2.1)\[f(x) = \frac{\lambda}{c} \exp(-\lambda x), \text{ where $L_B<x<U_B$}\]

    where \(c\) is a normalization constant, i.e.

    (2.7.1.2.2)\[c = \int_{L_B}^{U_B} \lambda\exp(-\lambda x) dx\]

    where \(x>0\) and \(\lambda>0\). Users can alternatively provide the mean of the distribution along with the truncated bounds.

    ../../../../_images/rv5.png

    Fig. 2.7.1.2.1 Extended random variable specification

    Input Type - Dataset

    Users can also define the random variables by providing a sample realization data set as shown in the below figure, by selecting the Dataset input type. The data will be fitted to the specified probability distribution model. Note that for some bounded distributions, such as beta and truncated exponential, the bounds should additionally be provided through the user interface.

    ../../../../_images/rv3.png

    Fig. 2.7.1.2.2 Example of the input dataset file

    Note

    • Clicking the Show PDF or Show PMF button will display the probability distribution (or mass) function of each random variable with the specified parameters/moments. If the PDF or PMF is not displayed, we recommend the users double-check if the parameters/moments are in a valid range. The plotting button is not activated for the Dataset input type.

    ERA19

    Engineering Risk Analysis Group, Technische Universität München: https://www.bgu.tum.de/era/software/eradist/ (Matlab/python programs and documentations)

    Correlation coefficients between each variable can be defined by clicking the Correlation Matrix button. Default correlations between variables are set to zero. The diagonal element of the matrix is fixed as one, and symmetry of the correlation matrix is enforced once the entries of the lower triangular part of the matrix are modified.

    ../../../../_images/rv4.png

    Fig. 2.7.1.2.3 Example of a valid correlation matrix

    Once the OK button is clicked after setting all required entries, the program will automatically check the validity of the matrix before closing the correlation matrix window. If the matrix is not positive definite, an error message will be displayed and the window will not be closed. In such a case, the user should adjust the correlation coefficients to be positive definite.

    Note

    • When a constant variable is introduced instead of probability distributions, the correlation coefficient corresponding to those variables will be ignored.

    • When more than one random variable is provided as Dataset, correlations between the data pairs will not be incorporated automatically. If correlations exist, the user can define them manually at the correlation matrix window.

    Warning

    Correlation warping for Nataf variable transformation of beta distributions is currently not supported.

Tip

Summary of capabilities and limitations

  • o Specify 12 different kinds of random distributions either by parameters, moments (mean and variance), or data samples (Specify 7 different kinds of random distributions by parameters when using Dakota instead of SimCenterUQ)

  • o Draw correlated samples through Nataf transformation (Gaussian-copular)

  • x Explicitly specify random fields (planned)

  • x Specify user-defined random distribution (planned)

  • x Specify Non-Gaussian copular correlation (upon request)