Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

generate random values binomial law in r

rbinom(m,n=size,p=prob)

#For instance 10 numbers in [0,1,2] with p=0.5  
rbinom(10,2,0.5)
#2 2 1 0 0 2 0 0 1 2
 
PREVIOUS NEXT
Tagged: #generate #random #values #binomial #law
ADD COMMENT
Topic
Name
2+1 =