Gaussian Distribution: What it is, How to Calculate, and More – Part I

Articles From: QuantInsti
Website: 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:

Gaussian Distribution QuantInsti

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 
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
         1/(sigma * np.sqrt(2 * np.pi)) * np.exp( - (bins - mu)**2 / (2 * sigma**2) ),
         color='r') hosted with ❤ by GitHub

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

Visit QuantInsti for additional insight on this article:

Disclosure: Interactive Brokers

Information posted on IBKR Campus that is provided by third-parties does NOT constitute a recommendation that you should contract for the services of that third party. Third-party participants who contribute to IBKR Campus are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from QuantInsti and is being posted with its permission. The views expressed in this material are solely those of the author and/or QuantInsti and Interactive Brokers is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to buy or sell any security. It should not be construed as research or investment advice or a recommendation to buy, sell or hold any security or commodity. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.