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