I am normally not working with Mathematica, but I have to understand a code written in i!
Can some body say what the arguments and parameters of code below say?
RandomReal[NormalDistribution[mz, (mz - sz)/1.64485], nd]
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.Sign up to join this community
Szabolcs encouraged me to post this as an answer. The use of
RandomInteger with statistical distributions was introduced, I believe, in version 6, prior to the introduction of
RandomVariate in version 8. This can be seen by looking at the Mathematica legacy documentation, specifically version 6 tutorials:
The functions RandomReal, RandomInteger, and RandomComplex generate uniformly distributed random numbers. RandomReal and RandomInteger also generate numbers for built-in distributions.
RandomReal[dist] gives pseudorandom numbers from the specified distribution.
RandomReal[dist, dims] pseudorandom array with dimensionality dims, and elements from the specified distribution
RandomInteger[dist] pseudorandom number with specified distribution
RandomInteger[dist, dims] pseudorandom array with dimensionality dims, and elements from the specified distribution
Although this syntax is now deprecated in favor of the unifying
RandomVariate it nevertheless remains valid, confirmed through the current version 12.0.
To answer the question actually asked, consult the documentation for
represents a normal (Gaussian) distribution with mean μ and standard deviation σ.
So your code requests
nd samples of a normal distrubiton with a mean
mz and a SD of
(mz - sz)/1.64485.