Random Normal Distribution - The Second Approximation

Published:

Updated:

Entry #2,329

Comments

Avatar paradisenow -
#1
wow great job ... now I really wish I did not suck at math...
Avatar JADELottery -
#2
Thanks. It's just maths, plusesuseses and minusesusesses.
Avatar JADELottery -
#3
Here's the Excel function:

The Standard Deviation is in Cell A1

The two random numbers are in Cells B1 and C1
{ to get the random number put this in each --> =rand() }

The randomly selected number can be put in Cell D1 by copying the following:
=(2/PI())*A1*LN(TAN((PI()/2)*B1))+2*PI()*IF(C1>=0.5,1,-1)*SIN(4*ATAN(SINH(B1/2)))*EXP(-1*((B1^2)+(PI()^2))/PI())
Avatar JADELottery -
#4
The approximation works well for standard deviations greater than or equal to 1.

If you need something for standard deviations less than 1, remove the second half of the addition:

+2*PI()*IF(C1>=0.5,1,-1)*SIN(4*ATAN(SINH(B1/2)))*EXP(-1*((B1^2)+(PI()^2))/PI())

Removing the second half of the addition will also work for any range of standard deviation, zero to infinity.
Avatar JADELottery -
#5
note: if you remove the second half addition, you only need one random number.

Post a Comment

Please Log In

To use this feature you must be logged into your Lottery Post account.

Not a member yet?

If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.

Register