Description Usage Arguments Value Examples
This function returns the number of successful experiments out of n Bernoulli experiments. So we define a sum(number of successes) and initialize it to zero. In a loop that is repeated n times, we put the output of brgen( the Bernoulli function) in variable ‘a’, and add it to sum(‘a’ is one in case of success and zero otherwise, so it makes sense)
1 | bigen(x)
|
n, number of experiments conducted, p, probability of success in one of them.
returns the number of successes( the binomial random variable)of n experiments
1 2 3 | a <- bigen(500, 0.4)
a
visualbigen(a)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.