Navigation :
random.normal
random.normal, function
def autodiff pure random.normal(): number
def autodiff pure random.normal(mu: number, sigma: number): number
Draws a deviate from a normal distribution. The zero-argument overload uses
mean 0 and standard deviation 1.
mu: the mean of the distribution.
sigma: the standard deviation, non-negative.
Examples
montecarlo 10000 with
x = random.normal()
sample avg0 = avg(x)
show scalar "Average sample (0,1)" with avg0
This outputs the following scalar:
| Average sample (0,1) |
| -0.001360023 |
montecarlo 10000 with
y = random.normal(2.5, 1.5)
sample avg1 = avg(y)
show scalar "Average sample (2.5,1.5)" with avg1
This outputs the following scalar:
| Average sample (2.5,1.5) |
| 2.519394 |