Monte Carlo Simulation


Lecture 10

September 15, 2023

Review and Questions

Systems and Uncertainty

Uncertainties arise due to the separation between the “internals” of the system and the “external” environment.

Conceptual Schematic of a Systems Model

Two Definitions of Probability

  1. Long-run frequency of an event (frequentist)
  2. Degree of belief that a proposition is true (Bayesian)

Questions?

Poll Everywhere QR Code

Text: VSRIKRISH to 22333

URL: https://pollev.com/vsrikrish

See Results

More On Probability

Conditional Probabilities

We often don’t want to just know if a particular event \(A\) has a certain probability, but also how other events (call them \(B\)) might depend on that outcome.

In other words:

We want the conditional probability of \(B\) given \(A\), denoted \(\mathbb{P}(B|A)\).

Conditional Probabilities

We can write conditional probabilities in terms of unconditional probabilities:

\[\mathbb{P}(B|A) = \frac{\mathbb{P}(BA)}{\mathbb{P}(A)}.\]

Bayes’ Theorem

Conditional probabilities can be inverted according to Bayes’ Theorem:

\[\mathbb{P}(A|B) = \frac{\mathbb{P}(B|A) \times \mathbb{P}(A)}{\mathbb{B}}.\]

Conditional Probability and Environmental Systems

Environmental outcomes are often dependent on other uncertain processes.

  • Upwind concentrations + stochastic winds ⇒ exposure
  • Sea-level rise + storm tides ⇒ coastal flooding
  • Extreme temperatures + many other mechanisms ⇒ power outages

Probability Distributions

The probability of possible values of an unknown quantity are often represented as a probability distribution.

Probability distributions associate a probability to every event under consideration (the event space) and have to follow certain rules (for example, total probability = 1).

Selecting a Distribution

The specification of distributions can strongly influence the analysis.

Probabilistic interactions between sea-levels and exposure

Selecting a Distribution

A distribution implicitly answers questions like:

  • What is the most probable event? How much more likely is it than the others?
  • Are larger or smaller events more, less, or equally probable?
  • How probable are extreme events?
  • Are different events correlated, or are they independent?

Key Features of Probability Distributions

  • Mean/Mode (what events are “typical”)
  • Skew (are larger or smaller events more or equally probable)
  • Variance (how spread out is the distribution around the mode)
  • Tail Probabilities (how probable are extreme events)

Common Distributions

  • Gaussian / Normal
  • Lognormal
  • Binomial
  • Uniform / Discrete Uniform

Probability Distribution Tails

The tails of distributions represent the probability of high-impact outcomes.

Key consideration: Small changes to these (low) probabilities can greatly influence risk.

Monte Carlo

Stochastic Simulation

Monte Carlo simulation: Propagating random samples through a model to estimate a value (usually an expectation or a quantile).

G a Probability Distribution b Random Samples a->b Sample c Model b->c Input d Outputs c->d Simulate

Goals of Monte Carlo

Monte Carlo is a broad method, which can be used to:

  1. Obtain probability distributions of outputs;
  2. Estimate deterministic quantities (Monte Carlo estimation).

Monte Carlo Estimation

Monte Carlo estimation involves framing the quantity of interest as a summary statistic (such as an expected value).

MC Example: Finding \(\pi\)

Finding \(\pi\) by sampling random values from the unit square and computing the fraction in the unit circle. This is an example of Monte Carlo integration.

\[\frac{\text{Area of Circle}}{\text{Area of Square}} = \frac{\pi}{4}\]

[ Info: Saved animation to /Users/vs498/Teaching/BEE4750/fall2023/slides/images/mc_pi.gif

MC Example: Dice

What is the probability of rolling 4 dice for a total of 19?

Can simulate dice rolls and find the frequency of 19s among the samples.

[ Info: Saved animation to /Users/vs498/Teaching/BEE4750/fall2023/slides/images/mc_dice.gif

Monte Carlo Estimation

This type of estimation can be repeated with any simulation model that has a stochastic component.

For example, consider our dissolved oxygen model. Suppose that we have a probability distribution for the inflow DO.

How could we compute the probability of DO falling below the regulatory standard somewhere downstream?

Monte Carlo and Uncertainty Propagation

This is an example of uncertainty propagation: draw samples from some distribution, and run them through one or more models to find the (conditional) probability of outcomes of interest (for good or bad).

For example (HW3): What is the probability that a levee will be overtopped given climate and extreme sea-level uncertainty?

Key Takeaways

Key Takeaways

  • Choice of probability distribution can have large impacts on uncertainty and risk estimates: try not to use distributions just because they’re convenient.
  • Monte Carlo: Estimate expected values of outcomes using simulation.

Upcoming Schedule

Next Classes

Monday: Lab on Monte Carlo.

Wednesday: Monte Carlo wrapup