# Getting started with uncertainty quantification (UQ)

**URL:** <https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128>\
**Category:** Chair's Blog\
**Created:** [April 12, 2019, 9:01am UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128 "2019-04-12T09:01:50Z")\
**Posts on this page:** 9\
**Page:** 1

<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:** [April 12, 2019, 9:01am UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/1 "2019-04-12T09:01:50Z")

</div>

## Introduction

Uncertainty quantification (UQ) has become a hot topic in virtually all domains of applied sciences and engineering in the last decade. In the research community, this relatively new field lies at the boundary of applied mathematics, statistics, and computational engineering sciences. In the last few years, not only the number of scientific publications in this area has blown up, but also new scientific journals\[1\] devoted to this topic have emerged. In parallel, several books, mostly with a high-level mathematical profile, have been published. In this respect, it is rather difficult for beginners to find their way. Even the [Wikipedia page](https://en.wikipedia.org/wiki/Uncertainty_quantification) on uncertainty quantification rapidly gets into computational details and methods without mentioning “the big picture” first.

In this post, I would like to introduce UQ from a pragmatic approach. As such, it is intended for engineers and scientists who have developed a model to understand a phenomenon, design a system, make some predictions, etc. and are now confronted with questions like:

- How do uncertainties affect the predictions of my model? How to provide error estimates/confidence bounds on my results?
- What are the important parameters that drive the model predictions and/or their uncertainty?
- What combinations of parameters lead to extreme/non-acceptable behavior/performance? How likely are these extreme events?
- How to best calibrate my model from experimental data while accounting for uncertainties?

Figure 1 provides a general scheme that can be used to identify the key ingredients of any uncertainty quantification problem.

 ![uqlab_abc](https://uqworld.org/uploads/default/original/1X/80f0b41e1dffde65481190ceed9dcca64b0f23df.jpeg)  
**Figure 1** : General scheme for posing uncertainty quantification problems (From [Ref.1](#HDR))

## Computational model (Step A)

Whatever your discipline, you are probably familiar with computational models that represent some real phenomenon through a set of governing principles or equations. These are in turn solved either analytically or, in most practical cases, computationally by a dedicated solver. Examples include finite element models of structures in civil and mechanical engineering, hydraulic flood models and dissemination of pollutants in environmental engineering, circuits and power grid simulators in electrical engineering, chemical kinetics, weather forecast and climate change models, disease-spreading models in epidemiology, real business cycle models in economics, actuarial models for insurance, etc.

Across these fields, the nature of the governing equations can be very different. However, after proper implementation of a solver, the computational model can be seen as a **black-box** function that predicts **quantities of interest** as a function of **input parameters** \[2\]. For the sake of simplicity, we consider here that inputs are gathered into a vector \mathbf{x} of dimension d. The model is denoted by \mathcal{M} and allows us to compute a vector of quantities of interest \mathbf{y} = \mathcal{M}(\mathbf{x}).

> **_… In practice_**  
> “Black-box” means that we only have access to _runs_ of the computational model for specific values of the inputs. The associated uncertainty propagation methods are called _non intrusive_ since they will not require any modification nor knowledge about the nature of your existing computational model. Of course, a UQ analysis will require repeated runs of the latter, so some form of automated batch execution for different sets of input parameters is to be expected!

## Sources of uncertainties (Step B)

In standard applications, the computational model \mathcal{M} is **deterministic** : if you run it twice with the exact same input vector, you get the exact same output up to machine precision. However, you may not know exactly what input values to use to properly represent your real system/phenomenon. That’s where the UQ analysis start: how to identify and represent your sources of uncertainty?

Two main types of uncertainties are encountered in practice:

- you don’t know exactly the value of a parameter: you may have a best guess and possibly lower and upper bounds. This is called **epistemic uncertainty** : there is a “true” value, but you don’t know it, so you want to represent your _lack of knowledge_.
- Observations/measurements show that there is _natural variability_ in the possible values of a parameter. This is called **aleatory uncertainty**.

The most common way to represent these two types of uncertainties is to use _probability theory_\[3\]: Each parameter is considered a random variable, for which a _probability distribution_ is selected based on available information, expert knowledge, statistical analysis or a combination thereof (for instance, using Bayesian statistics).

> **_… In practice_**  
> For each input parameter, you can start by defining:
> 
> - _reasonable bounds_, in the case of epistemic uncertainty. This can also be done in the format “_best estimate value \pm xx%_”. A uniform distribution is then an appropriate choice to represent the underlying uncertainty.
> - or a _distribution_ in the case of aleatory uncertainty. If you have data, applying standard statistical inference allows you to fit “the best” distribution. Even if there is no data, expert knowledge and literature in your field shall help you choose the right type of distribution. _In most cases, the well-known Gaussian distribution is not a good choice!_
> - The question of _statistical dependence_ between parameters need also to be addressed at this stage. Are there reasons to think that some parameters are correlated? If yes, this must be accounted for. A standard approach is to use a _copula function_ to couple the marginal distributions of the input variables into a joint random vector.

## Uncertainty propagation (Step C) and sensitivity analysis (Step C’)

Once (and only once) the model has been clearly described through its inputs and outputs, and a choice of probability distributions has been made for the inputs, one can proceed with uncertainty propagation to quantify the statistical properties of the output quantities \mathbf{y} caused by the uncertainty in the input parameters \mathbf{x}.

Depending on your problem, different statistics of \mathbf{y} may be of interest:

- the mean, standard deviation and other higher-order statistical moments
- the _probability density function_ (PDF), to check if it is uni- (resp. multi)-modal, skewed, etc.
- the tail of the PDF, more precisely the _probability of exceedance_ of a threshold
- the important input parameters, _i.e._ the ones which contribute most significantly to the response variability
- etc.

**Monte Carlo simulation** is a general technique for solving all these problems: first, you sample realizations of the input parameters using a random number generator. Then, for each sample, you run your computational model, and you collect the resulting realizations of the response. Using proper statistical estimators, you can, in theory, compute all the above-listed quantities. Monte Carlo simulation is however known to converge very slowly. You would typically need \mathcal{O}(100-1000) realizations when you are only interested in the second-order moments, whereas \mathcal{O}(10^5-10^7) is more common when dealing with small probabilities of exceedance or global sensitivity indices.

If your computational model is an analytical function or a simple computer code that runs in no time, you may afford this big number of realizations and it can be a good start. However, if you handle realistic high-fidelity computational models, you can most probably afford only \mathcal{O}(10-100) runs in a reasonable time. In this case, it is suitable to construct a **surrogate model** from this limited information, that is further used for the purpose of UQ. Popular surrogate models include polynomial chaos expansions, Gaussian processes (a.k.a. Kriging), neural networks, and support vector machines (SVM). You can find a concise introduction to these techniques here [Refs.2](#ManualPCE),[3](#ManualK),[4](#ManualSVR).

> **_… In practice_**
> 
> - Always start by properly defining the goals of your UQ study. If you are interested in small probabilities or in global sensitivity indices, completely different methods shall be used.
> - Surrogate models are just a means to efficiently solve problems that would take forever to solve otherwise using Monte Carlo simulation. They are not UQ methods _per se_! In fact, surrogate models are also used for optimization, pattern recognition, weather forecasts, among others.
> - However, it is well-known that (sparse) polynomial chaos expansions are a good technique to further compute moments and sensitivity indices, whereas Kriging and SVM combined with _active learning techniques_ are suitable to compute extremely small probabilities.

## And now, where to start?

If the keywords dropped in the previous paragraphs have rung a bell, you may already try to formulate your UQ problem following the rationale presented above. Then you probably want to have a look at a software package, install it, and run examples which are similar to your problem. We suggest the use of our software [UQLab](https://www.uqlab.com/), because it has been designed to be extremely easy to handle for beginners that have only a basic knowledge of MATLAB. Other well-established software and packages in different languages are listed [here.](https://uqworld.org/t/various-uncertainty-quantification-software-tools)

> **_… In practice_**  
> In most cases, the methods and tools required to solve your UQ problem already exist! There is generally _no point in writing your own UQ routines from scratch_ since many optimized packages in virtually all languages are available. See [this list](https://uqworld.org/t/various-uncertainty-quantification-software-tools) for more info on some of the  
> available software!  
> In contrast, setting up the UQ problem by properly defining your goals, choosing the appropriate computational model, the probabilistic representation of its inputs (based on your current level of information and amount of data) and the relevant method for uncertainty propagation may require some time. Don’t hesitate to ask questions on this forum to get help!

## References

1. B. Sudret, _[Uncertainty propagation and sensitivity analysis in mechanical models - Contributions to structural reliability and stochastic spectral methods](https://www.ethz.ch/content/dam/ethz/special-interest/baug/ibk/risk-safety-and-uncertainty-dam/publications/reports/HDRSudret.pdf)_, Habilitation à diriger des recherches, Université Blaise Pascal, Clermont-Ferrand, France (229 pages), 2007.
2. Marelli, S. and Sudret, B. _[UQLab user manual - Polynomial chaos expansions](http://uqftp.ethz.ch/uqlab_doc_pdf/1.2.1/UserManual_PolynomialChaos.pdf)_, Report UQLab-V1.2-104, Chair of Risk, Safety and Uncertainty Quantification, ETH Zurich, 2019.
3. Lataniotis, C., Marelli, S. and Sudret, B. _[UQLab user manual - Kriging (Gaussian process modelling)](http://uqftp.ethz.ch/uqlab_doc_pdf/1.2.1/UserManual_Kriging.pdf)_, Report UQLab-V1.2-105, Chair of Risk, Safety and Uncertainty Quantification, ETH Zurich, 2019.
4. Moustapha, M., Lataniotis, C., Marelli, S. and Sudret, B. _[UQLab user manual - Support vector machines for regression](http://uqftp.ethz.ch/uqlab_doc_pdf/1.2.1/UserManual_SupportVectorMachinesRegression.pdf)_, Report UQLab-V1.2-111, Chair of Risk, Safety and Uncertainty Quantification, ETH Zurich, 2019.

* * *

_[Back to the Chair’s Blog index](https://uqworld.org/t/about-the-chairs-blog-category)_

### Notes

* * *

1. [International Journal for Uncertainty Quantification](http://www.begellhouse.com/journals/uncertainty-quantification.html), [SIAM/ASA Journal of Uncertainty Quantification](https://www.siam.org/publications/journals/siam-asa-journal-on-uncertainty-quantification-juq), [ASCE-ASME Journal of Risk and Uncertainty in Engineering Systems](http://risk.asmedigitalcollection.asme.org/journal.aspx?journalid=170) 

2. In practice, each parameter could not only be a scalar but a time-series, a spatially-varying map, etc. 

3. Non-probabilistic representations using intervals, fuzzy sets, probability boxes, etc. are also used to represent epistemic uncertainties. It, however, raises computational issues when it comes to their propagation. See an overview in _R. Schöbi_, [Surrogate models for uncertainty quantification in the context of imprecise probability modelling](https://www.research-collection.ethz.ch/handle/20.500.11850/129564), 2017.

---

<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:** [April 25, 2019, 1:33pm UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/2 "2019-04-25T13:33:06Z")

</div>



---

<div class="post-metadata">

**Author:** ![valen](https://uqworld.org/letter_avatar_proxy/v4/letter/v/9dc877/32.png) [@valen](https://uqworld.org/u/valen)\
**Post date:** [February 4, 2020, 12:09pm UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/3 "2020-02-04T12:09:48Z")

</div>

> [@bsudret](#):
>
> his

I think you meant _its_ inputs and outputs 😉 @bsudret

---

<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 4, 2020, 12:39pm UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/4 "2020-02-04T12:39:23Z")

</div>

Dear Valentina

Thanks for noticing! I can see that you read the post in detail 😉 !  
It is now corrected.  
Best regards  
Bruno

---

<div class="post-metadata">

**Author:** ![oliver2902](https://uqworld.org/letter_avatar_proxy/v4/letter/o/a6a055/32.png) [@oliver2902](https://uqworld.org/u/oliver2902)\
**Post date:** [February 12, 2020, 7:59am UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/5 "2020-02-12T07:59:05Z")

</div>

Some of the links in your article are not working:

- Other well-established software and packages in different languages are listed [here.](https://uqworld.org/t/various-uncertainty-quantification-software-tools)
- See [this list](https://uqworld.org/t/various-uncertainty-quantification-software-tools) for more info on some of the available software!

Could you please check.  
Thanks,  
Oliver

---

<div class="post-metadata">

**Author:** ![damarginal](https://uqworld.org/user_avatar/uqworld.org/damarginal/32/73_2.png) [@damarginal](https://uqworld.org/u/damarginal)\
**Post date:** [February 12, 2020, 10:46am UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/6 "2020-02-12T10:46:15Z")

</div>

Hi @oliver2902,

welcome to UQWorld! Thanks for pointing them out. The links have now been fixed.

---

<div class="post-metadata">

**Author:** ![Riccardo\_Ferrari](https://uqworld.org/user_avatar/uqworld.org/riccardo_ferrari/32/645_2.png) [@Riccardo\_Ferrari](https://uqworld.org/u/Riccardo_Ferrari)\
**Post date:** [September 11, 2020, 10:20am UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/7 "2020-09-11T10:20:42Z")

</div>

Very pleasant intro! I am a researcher in the field of control systems theory. We work with dynamical systems modelled as linear or nonlinear ODEs (a mass/spring oscillator being one of the simplest systems of such). I was wondering, what would be a good piece of literature to start reading about uncertainty propagation in such systems? Would I find support in UQTool for doing uncertainty propagation in my case? Thank you!

Best

Riccardo

---

<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:** [September 11, 2020, 2:11pm UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/8 "2020-09-11T14:11:47Z")

</div>

Dear Riccardo

Welcome on UQworld!

UQ techniques are in general general-purpose. Monte Carlo simulation is the simplest approach and it can help you start if your model of the dynamical system is fast to run.

Very often though, each single run may take minutes to hours, and you then need _surrogate models_. That’s were it becomes (sometimes) tricky with dynamical systems, since the standard techniques (e.g. polynomial chaos expansions, Gaussian processes, support vector machines) may not work out of the box to surrogate a full response trajectory.

I can suggest some of our recent papers in this field (with plenty of references inside), see below. In any case, feel free to ask further questions on this forum! All these analysis (from Monte Carlo to surrogate modelling to sensitivity analysis, etc.) can be carried out with UQLab.

Best regards  
Bruno

[1] Mai, C. & Sudret, B., [_Surrogate models for oscillatory systems using sparse polynomial chaos expansions and stochastic time warping_](https://sudret.ibk.ethz.ch/research/publications/preprints-archive/2016-010.html), SIAM/ASA J. Unc. Quant., **2017** , _5_, 540-571.  
[2] Mai, C.-V., Spiridonakos, M. D., Chatzi, E. & Sudret, B., [_Surrogate modeling for stochastic dynamical systems by combining nonlinear autoregressive with exogeneous input models and polynomial chaos expansions_](https://sudret.ibk.ethz.ch/research/publications/preprints-archive/2016-002.html), Int. J. Uncertainty Quantification, **2016** , _6_, 313-339.  
[3] Yaghoubi, V., Marelli, S., Sudret, B. & Abrahamsson, T., [_Sparse polynomial chaos expansions of frequency response functions using stochastic frequency transformation_](https://sudret.ibk.ethz.ch/research/publications/preprints-archive/2016-006.html), Prob. Eng. Mech., **2017** , _48_, 39-58.

---

<div class="post-metadata">

**Author:** ![Riccardo\_Ferrari](https://uqworld.org/user_avatar/uqworld.org/riccardo_ferrari/32/645_2.png) [@Riccardo\_Ferrari](https://uqworld.org/u/Riccardo_Ferrari)\
**Post date:** [September 11, 2020, 2:30pm UTC](https://uqworld.org/t/getting-started-with-uncertainty-quantification-uq/128/9 "2020-09-11T14:30:08Z")

</div>

Dear Bruno,

thank you very much for the quick answer! I was indeed reading [1] right now, I will definitely check the other two as well.

Best!

Riccardo
