powered by
Function that generates and displays m repeated samples of n Bernoulli trials with a given probability of success.
bino.gen(samples, n, pi)
number of repeated samples to generate
number of Bernoulli trials
probability of success for Bernoulli trial
Simulated binomial distribution
Theoretical binomial distribution
# NOT RUN { bino.gen(1000, 20, 0.75) # }
Run the code above in your browser using DataLab