Home Site Statistics  |   Contact  |   About Us       Monday, July 13, 2020   

j0182084- Back to Home



Skip Navigation Links.

   Skip Navigation LinksHOME ›  AREAS OF EXPERTISE ›   Distribution Function ›  ~ Normal Distribution


"Distribution Functions"
Normal Distribution Method
Normal Distribution Results



Number of Points:
Number of Bins:



[ Initial Number of Bins: {20) ]
[ Initial Number of Points: {1000} ]

IMPLEMENTATION
Normal Distribution Method

The normal distribution, also called Gaussian distribution, is a probability distribution of great importance in many fields.

The histogram data is constructed by segmenting the range of the data into equal-sized bins. The vertical axis of the histogram is the number of counts for each bin, and the horizontal axis of the histogram is labeled with the range of response variable. Of course, the best approach to examine the normal distribution is to display the results graphically on a chart. The user can plot results through charting programs, such as Microsoft Excel and Matlab.


Normal Random Number Generator

A normal random generation can be obtained by using a polar algorithm. This algorithm creates two random values at a time. It involves finding a random point in the unit circle by generating uniformly distributed points [-1,1] x [-1,1] square and rejecting any points outside the circle.

Basics of the polar algorithm:

  • Generate two random numbers v1 and v2
  • Let v1 = 2 * v1 - 1, v2 = 2 * v2 - 1, and v12 = v1 * v1 + v2 + v2
  • If vl2 > 1, regenerate v1 and v2

Testing the Normal Distribution Method

To test the Normal Distribution method, a new static method has been added. The TestNormalDistribution() method has been written and executed. No additional code is shown.

For the test, two parameters were set:

number of bins = 20; (nBins)
number of points = 1000; (nPoints)

where the parameter (nBins) is the number of bins in the histogram and (nPoints) is the number of random points. Then a random array is created with a normal distribution. Finally, a comparison is made between the histogram of random data and the theoretical probability density function of the normal distribution. One can see that the results from the normal random generator are very close to the theoretical normal distribution function.

Running this example generates the results shown above.


           static void TestNormalDistribution();
              {
                  for (int i = 0; i < nBins; i++)
                 {
                      ListBox1.Items.Add(" x = " + xdata[i] + "," + " - - - - -> Normal random data = " + ydata[i] + "," + " - - - - -> Normal Distribution = " + Math.Round(ydistribution[i] * normalizeFactor,0).ToString());
                 }
              }



Other Implementations...


Object-Oriented Implementation
Graphics and Animation
Sample Applications
Ore Extraction Optimization
Vectors and Matrices
Complex Numbers and Functions
Ordinary Differential Equations - Euler Method
Ordinary Differential Equations 2nd-Order Runge-Kutta
Ordinary Differential Equations 4th-Order Runge-Kutta
Higher Order Differential Equations
Nonlinear Systems
Numerical Integration
Numerical Differentiation
Function Evaluation





Consulting Services - Back to Home
Home

Home Math, Analysis,
  expertise..."

EIGENVALUE SOLUTIONS...
Eigen Inverse Iteration
Rayleigh-Quotient Method
Cubic Spline Method

 

Applied Mathematical Algorithms

Home A complex number z = x + iy, where...

Complex Functions
Home Non-linear system methods...

Non Linear Systems
Home Construction of differentiation...

Differentiation
Home Consider the function where...

Integration
 
About Us

KMP Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms.

KMP Website >
Site Statistics >
Contact Us

KMP ENGINEERING
2461 E Orangethorpe Ave Fullerton, CA 92631 USA info@keystoneminingpost.com
Site Map

> Home
> Areas of Expertise
> Reference Items
> Managed Services
> Login

Mining & Software Engineering

Home
Since 2006 All Rights Reserved  © KMP Engineering LINKS | PRIVACY POLICY | LEGAL NOTICE