Navigation :
random.ranvar
random.ranvar, function
def pure random.ranvar(r: ranvar): number
Draws a deviate from the distribution represented by r.
r: the ranvar to sample from.
Example
montecarlo 10000 with
x = random.ranvar(poisson(2))
sample avgX = avg(x)
show scalar "Average sample" with avgX
This outputs the following scalar: