In probability theory, a normal (or Gaussian or Gauss or Laplace–Gauss) distribution is a type of continuous probability distribution for a real-valued random variable. The general form of its probability density function is
The parameter μ is the mean or expectation of the distribution, while the parameter σ is its standard deviation.
The variance of the distribution is σ2. A random variable with a Gaussian distribution is said to be normally distributed.
The simplest case of a normal distribution is known as the standard normal distribution. This is a special case when μ = 0 and σ = 1, and it is described by this probability density function.
The cumulative distribution function (CDF) of the standard normal distribution, usually denoted with the capital Greek letter Φ, is the integral
We use Simpsons 1/3rd rule to do the integration.Further to eliminate infinity term we can use the definition of error function to write
where
Simpson's rule is one of the numerical method to compute the integration of a function over a finite interval. The most basic of these rules states.
Suppose that the interval [a,b] is split up into n sub-intervals, with n an even number. Then, the composite Simpson's rule is given by
where xj =a+jh for j=0,1...n-1,n with h=(b-a)/n
In general the error term in the simpson's 1/3rd rule is
where h is the step size.
For the Gaussian Function the error term comes out to be
it has a golbal maxima at 0. During the computation of integration our interval always contains 0 because
Φ(x)= 0.5(1+erf(x)) and erf(x) contains 0 in its interval.
Substituting all the values h=0.01, f(4)(x=0) we get the error ≈ 2e-10
For the numerical computation purposes python's math library was used.
And for the interface python's Tkinter which is a de-facto standard GUI package.
There are two ways to run the script
Method 1: Download the main.exe and run executable file
Method 2(for users with python):
a) Download and install python3:
b) Clone the directory
run git clone https://github.com/susmitmishra125/Normal-Distribution-using-GUI.git
c) Install requirements:
Locate the directory you cloned to on terminal and run pip3 install -f requirements.txt
d) Run python main.py
in the same directory