http://hughesbennett.co.uk/RandomNumbersForSimulations
©2012 Hughes Bennett Education
Hughes Bennett EducationQuestions by topic
Primary school
Secondary school
Computers & networks
Business economics

SMART subscriptions
Login
Subscribe
SMART Learning Method™

Popular software tools
Octave
Maxima
R Project
Graphviz
Context Free

All software tools
Bamboo Toolbox



Search

Terms & conditions
Privacy policy

Updated 2012-03-05 13:57:52
©2012 Hughes Bennett Education
Published using WikkaWiki

Generating random numbers for use in simulations


An important task during simulations is the construction of the random numbers to imitate changing input values. The discrete uniform distribution is useful for this purpose because it has the property that all events in a set N have the same probability of 1/N.

R scripts can generate random numbers from the uniform distribution by using the runif( n, [min = 0, max = 1 ] ) command, where,
  • n is the quantity of random numbers to generate
  • min is the lower limit of the distribution
  • max is the upper limit of the distribution