Description Usage Arguments Value Note Author(s) Examples
create a random sample of n elements for a normal distribution determined by the mean, sd, lower and upper bounds.
1 | random.sample(n, mean, sd, lowerBound, upperBound)
|
n |
Number of elements to calculate |
mean |
Mean of the distribution |
sd |
Standard deviation of the distribution |
lowerBound |
minimum value of the distribution |
upperBound |
maximum value of the distribution |
na vector containing n values with the mean and sd of the given distribution and bounded by the upper and lower bounds given
Distribution is assumed to be normal Useful when need to generate data for simulations following the descriptors of a given population.
Not me...
1 2 3 4 | #considering a length distribution of the observed population
#determined by a mean of 5, and sd 0.5, and with a minimum
#value of 3 and maximum of 6.5
L = random.sample(20,5,0.5,3,6.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.