# Prior distributions available in enkf

### From Ert

## Contents |

## General overview

When defining a parametrization of an ECLIPSE model for use with the Ensemble Reservoir Tool, a set of prior distributions are available. These distributions can be used whenever a prior distribution is asked for in the Parametrization keywords.

Prior distributions are a central concept in Bayesian statistics.

## List of priors

##### NORMAL

To set a normal (Gaussian) prior, use the keyword `NORMAL`. It takes two arguments, a mean value and a standard deviation. Thus, the following example will assign a normal prior with mean 0 and standard deviation 1:

NORMAL 0 1

##### LOGNORMAL

A stochastic variable is log normally distributed if it's logarithm is normally distributed. In other words, if X is normally distributed, then *e**x**p*(*X*) is log normally distributed. Thus, a log normal prior is suited to model positive quanties with a heavy tail (tendency to take large values). To set a log normal prior, use the keyword `LOGNORMAL`. It takes two arguments, the mean and standard deviation of the **logarithm** of the variable. Here is an example:

LOGNORMAL 0 1

##### TRUNCATED_NORMAL

This distribution is specified as

TRUNCATED_NORMAL mu std min max

This distribution is *not* a proper truncated normal distribution and works as follows:

- Draw random variable X ~ N(mu,std)
- Clamp X to the interval [min, max]

I.e. the truncation [min,max] should be a 'rare' event.

##### UNIFORM

A stochastic variable is uniformly distributed if has a constant probability density on a closed interval. Thus, the uniform distribution is completely characterized by it's minimum and maximum value. To assign a uniform distribution to a variable, use the keyword `UNIFORM`, which takes a minimum and a maximum value for a the variable. Here is an example, which assigns a uniform distribution between 0 and 1 to a variable:

UNIFORM 0 1

It can be shown that among all distributions bounded below by a and above by b, the uniform distribution with parameters a and b has the maximal entropy (contains the least information). Thus, the uniform distribution should be your preferred prior distribution for robust modeling of bounded variables.

##### LOGUNIF

A stochastic variable is log uniformly distributed if it's logarithm is uniformly distributed on the interval [*a*,*b*]. To assign a log uniform distribution to a a variable, use the keyword `LOGUNIF`, which takes a minimum and a maximum value for the output variable as arguments. The example

LOGUNIF 0.00001 1

will give values in the range [0.00001,1] - with considerably more weight towards the lower limit. The log uniform distribution is useful when modeling a bounded positive variable who has most of it's probability weight towards one of the bounds.

##### DUNIF

The keyword `DUNIF` is used to assign a discrete uniform distribution. It takes three arguments, the number bins, a minimum and maximum value. Here is an example which creates a discrete uniform distribution on [0,1] with 25 bins:

DUNIF 25 0 1

##### ERRF

The `ERRF` keyword is used to define a prior resulting from applying the error function to a normally distributed variable with mean 0 and variance 1. The keyword takes four arguments:

ERRF MIN MAX SKEWNESS WIDTH

The arguments `MIN` and `MAX` sets the minimum and maximum value of the transform. Zero `SKEWNESS` results in a symmetric distribution, whereas negative `SKEWNESS` will shift the distribution towards the left and positive `SKEWNESS` will shift it towards the right. Letting `WIDTH` be larger than one will cause the distribution to be unimodal, whereas `WIDTH` less than one will create a bi-modal distribution.

##### DERRF

The keyword `DERRF` is similar to `ERRF`, but will create a discrete output. `DERRF` takes 5 arguments:

DERRF NBINS MIN MAX SKEWNESS WIDTH

`NBINS` set the number of discrete values, and the other arguments have the same effect as in `ERRF`.

##### CONST

The keyword `CONST` is used to assign a Dirac distribution to a variable, i.e. set it to a constant value. Here is an example of use:

CONST 1.0