# Gaussian Distribution: What it is, How to Calculate, and More – Part I Contributor:
QuantInsti
Visit: QuantInsti

In this blog, we learn everything there is to Gaussian distribution. We will reveal some details about one of the most common distributions in datasets, dive into the formula to calculate gaussian distribution, compare it with normal distribution, and so much more.

We’ll cover:

• What is Gaussian distribution?
• Why is it called a Gaussian distribution?
• Difference between Gaussian distribution and Normal distribution
• How is Gaussian distribution calculated?
• Calculating Gaussian distribution using Python
• Gaussian distribution in finance
• Modern economics and Gaussian distribution
• What is the Efficient Market Hypothesis?
• What is the Black-Scholes-Merton model?
• What is the Efficient Frontier Portfolios theory?
• Example of Gaussian distribution

## What is Gaussian distribution?

When we are working with data in statistics, one of the most fundamental analyses is to check the data distribution.

Depending on the nature of the data, we can find different distributions. Such as the binomial distribution, the Poisson distribution, the Cauchy-Lorentz distribution, etc.

The Gaussian distribution is used in a generalized way to describe the behavior of prices, in this post we will try to understand a little better this distribution and the implications it has on the financial world and risk control.

## Why is it called a Gaussian distribution?

The name Gaussian distribution comes from the mathematician Carl Friedrich Gauss who realized the shape of the curve while studying the randomness of errors.

Or in honor of its discoverer sometimes it is named as Laplace-Gauss distribution since Gauss based his research on Laplace’s studies.

## Difference between Gaussian distribution and Normal distribution

The Gaussian distribution is so common that it is often called a normal distribution.

In the Gaussian distribution, most of the data are concentrated around a measure with a certain dispersion or variance. To be specific, a Gaussian distribution is symmetric and has a constant mean and variance.

This, therefore allows us to make predictions about an unknown value when we already have a set of known values that follow a Gaussian distribution. If the mean is zero and the variance is one, we call it a standard normal distribution.

Gaussian distribution, normal distribution,  bell curve, Gauss’ bell… All these terms refer to the same thing. A normal or Gaussian distribution is found repeatedly in nature, such as the people/animals’ height or weight, the speed in a race, IQ, etc.

Gaussian distribution is one of the most frequently observed data distributions in nature hence, it is thus called normal or standard distribution. Or because of the shape of the graph, it is also often referred to as a Gauss’ bell.

## How is Gaussian distribution calculated?

The mathematic form of a Gaussian function is as follow:

for arbitrary real constants a, b and *non-zero* c.

Gaussian functions are widely used in statistics to describe the normal distributions and hence are often used to represent the probability density function of a normally distributed random variable with expected value μ=b and variance σ2=c2.

In this case, the Gaussian is of the form:

## Calculating Gaussian distribution using Python

Let’s see how to compute a Gaussian distribution in Python:

``````# How is Gaussian distribution calculated?
# The example comes from the Numpy documentation at numpy.random.normal
# https://numpy.org/doc/stable/reference/random/generated/numpy.random.normal.html
import numpy as np
import matplotlib.pyplot as plt

# Draw samples from the distribution:
mu, sigma = 0, 0.1 # mean and standard deviation
s = np.random.normal(mu, sigma, 1000)

# Display the histogram of the samples, along with the probability density function:
# Plot the histogram
count, bins, ignored = plt.hist(s, 30, density=True)
# Plot the probability density function
plt.plot(bins,
1/(sigma * np.sqrt(2 * np.pi)) * np.exp( - (bins - mu)**2 / (2 * sigma**2) ),
linewidth=2,
color='r')
plt.show()``````

gaussian_distribution.py hosted with ❤ by GitHub

Stay tuned for the next installment in which Mario Pisa will discuss Gaussian distribution in finance.