JMathLabTutorial:Statistics (Random Numbers)

From jWork.ORG
Revision as of 20:41, 27 December 2016 by Jworkorg (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Limitted access. Reguest membership or login to this link first if you are already a member

Random numbers

You can create vectors and matricies with random numbers using the major distributions. Look at the package [http:/ random_numbers] for the description of various random-number generators.

For example, let us create a vector and a matrix with the random numbers distributed in accordance with a Poisson distribution (assuming the mean 2):

v=poisson_rnd(2,10)   % create vector with 10 elements 
m=poisson_rnd(2,10,3) % create matrix 10x3
printf('%f',m)        % print

Learn how to graph these random numbers using histograms ("density plots") in the next section.