## Geostatistics

**Geostatistics** is a class of statistics used to analyze and predict the values associated with spatial or spatiotemporal phenomena. It incorporates the spatial (and in some cases temporal) coordinates of the data within the analyses. (*Source: arcgis*)

## What is SGems?

**The Stanford Geostatistical Modeling Software (SGeMS)** is an** open-source** computer package for solving problems involving spatially related variables. It provides geostatistics practitioners with a user-friendly interface, an **interactive 3-D visualization**, and a wide selection of algorithms.

Users can perform complex tasks using the embedded Python scripting language, and new algorithms can be developed using the SGeMS plug-in mechanism. SGeMS is the first software to provide algorithms for multiple-point statistics. The SGeMS package provides a versatile toolkit for **Earth Sciences** graduates and researchers, as well as practitioners of environmental, **mining** and petroleum engineering.

## What is Sequential Gaussian Simulation?

Gaussian Geostatistical Simulations work by first creating a grid of randomly assigned values drawn from a standard normal distribution (mean = 0 and variance = 1). The covariance model (from the semivariogram specified in the Simple Kriging layer, which is required as input for the simulation) is then applied to the raster. This ensures that raster values conform to the spatial structure found in the input dataset. The resulting raster constitutes one unconditional realization, and many more can be produced using a different raster of normally distributed values each time. Details of this method may be read in Dietrich and Newsam (1993). (source: esri )

### Sgsim Steps

**Algorithm 1**

- Define a random path visiting each node of the grid once
- At each node u, the local conditional cumulative distribution function is Gaussian,

its mean is estimated by simple kriging and its variance is equal to the simple kriging

variance. The conditioning data consist of both neighboring original data (n) and

previously simulated values - Draw a value from that Gaussian ccdf and add the simulated value to the data set
- Proceed to the next node in the path and repeat the two previous steps until all nodes have been visited (
*source: Geostatistical Earth Modeling Software:User’s Manual – N. Remy*)

### Histogram Transformation

The sequential Gaussian simulation algorithm as described above assumes that the variable is Gaussian. If that is not the case, it is possible to transform the marginal distribution of the variable into a Gaussian distribution and work on the transformed variable.

- Transform Z into a Gaussian variable according to formula
- Simulate Y as in
**Algorithm 1** - “Back-transform” the simulated values y1; :::; yN into z1; :::; zN