Nothing
# random number generators
# obtained from U(0,1) generated by runif(1,0,1)
ran.unif <- function(a,b){
u <- runif(1,0,1) # generate uniform U(0,1)
x <- (b-a)*u+a # apply transform
return(x) # return the calculated value
}
# exponential
ran.exp <- function(rate){
u <- runif(1,0,1) # generate uniform U(0,1)
x <- (1/rate)*(-log(u))
return(x)
}
# standard normal
ran.norm <- function( ){
# generate two values from uniform
u1 <- runif(1,0,1); u2 <- runif(1,0,1)
z <- cos(2*pi*u1)*sqrt(-2*log(u2))
return(z)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.