# PSHA with the OpenQuake engine#

This chapter describes the mathematical framework for PSHA implemented by the OpenQuake engine. More comprehensive descriptions of Probabilistic Seismic Hazard Analysis can be found for example in McGuire (2004) and USNRC (2012).

## Basic concepts#

Two main assumptions are at the base of all PSHA calculators included in the OpenQuake engine:

seismicity in a region is described by a collection of

*independent seismic sources*(i.e. the occurrence of an earthquake rupture in a source does not affect the probability of earthquake occurrence in the other sources)each source generates

*independent earthquake ruptures*(i.e. the occurrence of an earth- quake rupture in a source does not affect the probability of occurrence of the other potential earthquake ruptures in the same source)

The Classical, Event-Based, and Disaggregation analysis requires the
definition of two main components: the *seismic source model*, that
is a collection of seismic sources describing the seismic activity in
a region of interest, and the *ground motion model*, that is a
mathematical relationship defining the probability distribution of a
ground motion parameter at a site given the occurrence of an
earthquake rupture.

The design of a seismic source model involves the specification of a
number of sources whose main parameters are the geometry,
constraining the earthquake rupture locations, and the
*magnitude-frequency distribution*, defining the average annual
occurrence rate over a magnitude range. A seismic source model
(*SSM*) can be therefore defined as a set of *I* seismic sources
(*Src*):

Chapter 3 provides a detailed description of the
different source typologies supported by the OpenQuake engine. However,
independently of the typology, in a PSHA each source undergoes a
discretization process which effectively generates a number of
distinct earthquake ruptures. A generic *i*-th source defines
therefore a set of *J* earthquake ruptures:

## Classical PSHA#

The classical PSHA analysis allows calculating the probabilities of
exceeding, at least once in a given time span, and at a given site, a
set of ground motion parameter levels considering all possible
earthquake ruptures defined in a seismic source model. Such a list of
probability values is usually referred to as *hazard curve*.

We indicate with \(P(X \geq x|T)\) the probability that a ground-motion
parameter *X* exceeds, at least once in a time span \(T\) , a level
\(x\). \(P(X \geq x|T)\) can be computed as 1 minus the probability that
none of the sources is causing a ground motion exceedance. By
assuming *independent sources*, the probability that none of the sources is
causing an exceedance is equal to the product of the probabilities that each
source does not cause an exceedance, that is:

where \(P_{src_i}(X<x|T)\) is the probability that the *i*-th
source is not causing an exceedance and \(I\) is the total number of
sources in the source model.

By further assuming each source generates *independent earthquake
ruptures*, we can compute \(P_{src_i}(X<x|T)\) as the product of
the probabilities that each rupture does not cause an exceedance,
that is:

where \(P_{rup_{ij}}(X<x|T)\) is the probability that the *j*-th
rupture in the *i*-th source is not causing an exceedance and \(J_i\)
is the total number of ruptures generated by the *i*-th source.

Intuitively, the fact that a rupture does not cause any exceedance in a given time span T can be due to the fact that the rupture does not occur at all or that the rupture occurs once but without causing an exceedance, or that the rupture occurs twice but both times without causing an exceedance, and so on. Given that all these events are mutually exclusive, by using the total probability theorem we can write:

where \(P_{rup_{ij}}(k|T)\) is the probability that the *j*-th
rupture in the *i*-th source is occurring \(k\) times in time span \(T\)
and \(P(X<x|rup_{ij})\) is the conditional probability that
parameter \(X\) is not exceeding level \(x\) given an occurrence of
\(rup_{ij}\).

Relying therefore on the assumptions of independent sources and independent earthquake ruptures generated by each source, we can compute the probability of at least one ground motion exceedance as:

It is worth noticing how equation 2.6 allows the calculation of hazard curves for any temporal occurrence model. More precisely, only the probability of the number of rupture occurrences \(P_{rup_{ij}}(k|T)\) depends on the temporal occurrence model, while the procedure for calculating the final probability of ground motion exceedance remains the same. This also means that is possible to define in the same source model sources with different temporal occurrence models (for instance time-dependent and time-independent sources).

### Poissonian source model#

If we now assume a source model to consist only of Poissonian sources, we can write \(P_{rup_{ij}}(k|T)\) for every rupture as:

where \(nu_{ij}\) is the average annual occurrence rate for the *j*-th
rupture in the *i*-th source. We can then place equation
above and thus write:

Making use of the property:

we can rewrite 2.8 as:

By now recognizing that, according to the Poissonian distribution, the probability of at least one occurrence (that is one or more) in a time span \(T\) of \(rup_{ij}\) is:

we can write equation 2.10 as:

By placing equation 2.12 in 2.6, we can write:

Equation 2.13 is used by the OpenQuake engine for the calculation of hazard curves when performing Classical PSHA with a Poissonian source model. To our knowledge, this equation has been first proposed by Field et al. (2003), derived from the traditional rate-based formulation converted in terms of probabilities (their equation A8). Instead, we derive it from the assumptions of a source model consisting of independent sources, independent earthquake ruptures generated by each source, and ruptures obeying to a Poissonian temporal occurrence model.

### Equivalence with the rate-based equation#

It is worth noticing how equation 2.13 is
equivalent to the more traditional rate-based hazard equation
(McGuire, 1995). Indeed, by assuming ground
motion occurrence to follow a Poissonian distribution in time, and
indicating with *n* the mean annual rate of exceeding a ground motion
level x, we can write:

We can also rewrite 2.13 as:

The equivalence between equations and 2.15 is possible if and only if:

Assuming now, for the sake of simplicity, that a rupture is
completely characterized by magnitude and distance from a site, we
can write the rate of occurrence of the *j*-th rupture as:

where \(nu_{i}\) is the total occurrence rate for the *i*-th source, and
\(f_i(m,r)\) is the probability, for the *i*-th source, of
generating a rupture of magnitude \(m\) and distance \(r\). By placing
2.17 in 2.16 and by replacing
the discrete summation over ruptures with a continuous integral over
magnitude and distance, we can write:

which is the traditional equation for calculating ground motion exceedance rates (McGuire, 1995).

## Event-based PSHA#

The goal of an Event-based PSHA is to simulate seismicity in a region as described by a source model and to simulate ground shaking on a set of locations accordingly with a ground motion model. In both cases, simulation involves a Monte Carlo (i.e. random) sampling procedure.

Seismicity is simulated by generating a *stochastic event set* (also
known as *synthetic catalog*) for a given time span \(T\). For each
rupture generated by a source, the number of occurrences in a time
span \(T\) is simulated by sampling the corresponding probability
distribution as given by \(P_{rup}(k|T)\). A stochastic event set is
therefore a *sample* of the full population of ruptures as defined by a
seismic source model. Each rupture is present zero, one or more times,
depending on its probability. Symbolically, we can define a stochastic event
set \(SES\) as:

where \(k\), the number of occurrences, is a random sample of \(P_{rup}(k|T)\), and \(k \times rup\) means that rupture \(rup\) is repeated \(k\) times in the stochastic event set.

Given an earthquake rupture, the simulation of ground shaking values
on a set of locations \(x=(x_1,x_2,.....,x_N)\)
forms a *ground motion field*. In a Event-based PSHA, for each rupture in a
stochastic event set, the ground motion field is obtained by sampling
the probability distribution defined by the ground motion model. As
described in Chapter 4, the ground motion
distribution at a site is assumed to be a Normal distribution. The
aleatory variability is described in terms of an *inter-event* (also
known as *between-events*) standard deviation (\(\tau\)) and intra-event
(also known as *within-event*) standard deviation (\(\sigma\)). The
simulation of a ground motion field is therefore the result of the
summation of three terms, the logarithmic mean of the ground motion
distribution:

the inter-event variability:

and the intra-event variability:

where:

It is worth noticing how the inter-event variability, uniform for all
sites given an earthquake rupture, is drawn from an univariate normal
distribution of mean 0 and standard deviation *t*, while the
intra-event variability is a random sample of a multivariate normal
distribution of mean \(0\) and covariance matrix \(\Sigma\).
\(\Sigma\) is a
diagonal matrix when considering no correlation in the intra-event
variability, while it has non-zero off-diagonal elements when
considering a correlation model (\(\rho\)) for the intra-event aleatory
variability.

### Calculation of hazard curves from ground motion fields#

The ground motion fields simulated for each rupture in a stochastic event set can be used to compute hazard curves. Indeed, indicating with \(T_0\) the duration associated with a stochastic event set, and with \(K\) the number of ground motion fields (and associated ruptures) simulated in time \(T_0\), we can compute the rate of exceedance of a ground motion level \(x\) at a site as (Ebel and Kafka, 1999):

where \(H\) is the Heaviside function and \(x_k\) is the ground motion
parameter value at the considered site associated with the *k*-th
ground motion field. The exceedance rate obtained from equation 2.24 can then be
used to compute the probability of at least one occurrence in any time span
\(T\) , accordingly with the Poissonian distribution, using equation 2.14.
This approach is possible when the source model from which the
stochastic event set is generated is Poissonian.

As the stochastic event set duration \(T_0\) increases, equation 2.24 provides an increasingly more accurate estimate of the actual rate of exceedance. A larger \(T_0\) can be achieved not only by simulating a single stochastic event set with longer duration, but also by simulating multiple stochastic event sets. These can then be joined together to form a stochastic event which has a large enough duration to provide a stable estimate of the rates of ground motion exceedance.

## Disaggregation#

The disaggregation analysis allows investigating how the different earthquake ruptures defined in a source model contribute to the probability of exceeding a certain ground motion level \(x\) at a given site. Given the very large number of earthquake ruptures associated with a source model, contributions cannot be investigated on a rupture by rupture basis but a classification scheme is used instead. Ruptures are classified in terms of the following parameters:

magnitude (\(M\))

distance to rupture surface-projection (Joyner-Boore distance) (\(r_{jb}\))

longitude and latitude of rupture surface-projection closest point (\(\lambda\) , \(\phi\))

tectonic region type (\(TRT\))

For each earthquake rupture, the associated conditional probability of ground motion exceedance – \(P(X \geq x|T,rup)\) – is computed for different \(\epsilon\) bins, where \(\epsilon\) is the difference, in terms of number of total standard deviations, between \(x\) and the mean ground motion \(\mu\) as predicted by the ground motion model, that is:

The disaggregation in terms of *e* allows investigating how the
different regions of the ground motion distributions contribute to
the probability of exceedance.

The rupture parameters (\(M\), \(r_{jb}\), \(\lambda\), \(\phi\) , \(TRT\)) together with the \(\epsilon\) parameter effectively create a 6-dimensional model space which, discretized into a number of bins, is used to classify the probability of exceedance for different combination of rupture parameters and \(\epsilon\) values.

For a given model space bin \(m\) = (\(M\), \(r_{jb}\), \(\lambda\), \(\phi\) , \(TRT\)) the probability of exceeding level \(x\) at least once in a time span \(T\) is computed using equation 2.6, that is:

In other words, if a rupture belongs to the considered bin, then the probability of not causing a ground motion exceedance is computed according to equation 2.6, otherwise the probability is 1 (that is, given that the rupture does not belong to the bin it can never cause a ground motion exceedance).

### Disaggregation histograms#

Disaggregation values as given by equation 2.26 can be aggregated in order to investigate earthquake rupture contributions over a reduced model space. The following disaggregation histograms are provided by the OpenQuake engine.

Magnitude disaggregation:

Distance disaggregation:

Tectonic region type disaggregation:

Magnitude-Distance disaggregation:

Magnitude-Distance-Epsilon disaggregation:

Longitude-Latitude disaggregation:

Longitude-Latitude-Magnitude disaggregation:

Longitude-Latitude-Tectonic Region Type disaggregation:

All the above equations are based on the assumption that earthquake ruptures in different bins are independent, therefore probabilities can be aggregated by using the multiplication rule for independent events. The probability of a ground motion exceedance over a reduced model space is computed simply as 1 minus the probabilty of non-exceedance over the remaining model space dimensions.

### Comparison between OpenQuake engine disaggregation and *traditional* disaggregation#

The traditional disaggregation analysis as commonly known in literature (e.g. Bazzurro and Cornell, 1999) differs from the one provided by the OpenQuake engine. Indeed, a disaggregation analysis tipically provides the conditional probability of observing an earthquake scenario of given properties (magnitude, distance, epsilon, …) given that a ground motion exceedance is occurred, which can be written (following the same notation used in this chapter) as:

On the contrary, the OpenQuake engine (as described in equation 2.26) provides the conditional probability of observing at least one ground motion exceedance in a time span \(T\) given the occurrence of earthquake ruptures of given properties \(m\), that is:

The probabilities given in equations 2.35 and 2.36 are clearly different. Indeed, for different \(m\), values given by equation 2.35 must sum up to 1, while this is not the case for equation 2.36. For the former equation different \(m\) represent mutually exclusive events, while for the latter they represent independent events.

When considering a Poissonian source model it is possible however to derive equation 2.35 from equation 2.36. Indeed, indicating with \(\nu_m\) the rate of ground motion exceedance \((X>x)\) associated with earthquake ruptures of properties \(m\) and with \(\nu\) the rate of ground motion exceedance associated with all earthquake ruptures, we can write equation 2.35 as:

By solving the Poissonian equation 2.14 for the rate of exceedance, we can write \(\nu_m\) as:

\(\nu\) can be obtained using the same equation above but considering \(P(X>x|T)\) instead of \(P(X>x|T,m)\), where \(P(X>x|T)\) is obtained by aggregating, using the multiplicative rule, the probabilities over the different \(m\), that is:

By computing \(\nu_m\) and \(\nu\) from \(P(X>x|T,m)\) it is hence possible to obtain the more traditional disaggregation results as given in equation 2.35.