Maxwellian Distribution

Project Home - Simulation Basics

Maxwellian distribution is making sure that your data is evenly distributed around 0 essentially in a bell curve like the one shown below. This is accomplished by the following equation.

Maxwellian Distributed Value = Scaling Factor * Square Root ( -2 * ln (1 - random number) )

* cos (2 * p * random number)

The random numbers are between 0 and 1. In the equation ln is the natural logarithm also known as the log based e. This creates a bell curve about 0 for a large number of trials. Sine can be used instead of Cosine and both are used if the problem is in 2 dimensions. The scaling factor is how far from 0 you want the values to go. 99% of the values fall within three times of your scaling factor.