powered by
accept.reject(prob, a, b, n)
accept.reject(prob=c(0.3,0.4,0.2,0.1),a=0,b=3,n=100)
Run the code above in your browser using DataLab