powered by
#'
Density, distribution function, quantile function and random generation for the benoulli distribution with parameter prob.
prob
rbern(n, prob)
A vector of 0's and 1's representing failure and success.
number of observations. If length(n) > 1, the length is taken to be the number required.
length(n) > 1
probability of success of each trial
#Return a random result of a Bernoulli trial given `prob`. rbern(n =1, prob = 0.5)
Run the code above in your browser using DataLab