powered by
Samples from the Truncated Normal Distribution
rtnorm(n = 1, mean = 0, sd = 1, lower = -Inf, upper = Inf)
vector
integer: number of samples to be drawn
vector of means
vector of standard deviations
left truncation point
right truncation point
Jarrod Hadfield j.hadfield@ed.ac.uk
Robert, C.P. (1995) Statistics & Computing 5 121-125
rtnorm
hist(rtnorm(100, lower=-1, upper=1))
Run the code above in your browser using DataLab