- Function Normal(Mean, Deviation)
Normal
The function Normal
draws a random value from a normal distribution.
Normal(
Mean, ! (optional) numerical expression
Deviation ! (optional) numerical expression
)
Arguments
- Mean
A scalar numerical expression.
- Deviation
A scalar numerical expression \(> 0\).
Return Value
The function
Normal
returns a random value drawn from a normal distribution with mean Mean and standard deviation Deviation.
Graph
A graph with:
a histogram for 1.000 experiments of drawing from distribution
Normal(0,10)
, andthe
DistributionDensity
forNormal(0,10)
Example
The code:
option seed := 1234 ;
_p_draw := Normal( 0, 10 ) ;
_p_pointDensity := DistributionDensity( Normal( 0, 10 ), 3 );
block where listing_number_precision := 6 ;
display _p_draw, _p_pointDensity ;
endblock ;
will produce
_p_draw := 6.124772 ;
_p_pointDensity := 0.038139 ;
in the listing file.
References
The
Normal
distribution is discussed in full detail in Continuous Distributions of the Language Reference.