mymult | R Documentation |
finds the number of successes in each iteration given an array of probabilities, 1 per option. The function adds the number of iterations that received each number of successes, divides by overall number of iterations, and represents the distribution as a percentage.
mymult(iter = 100, n = 10, p = c(1, 1, 1, 1)/4)
iter |
number of iterations |
n |
number of samples taken each iteration, with replacement |
p |
array of probabilities for each outcome, add to 1 |
a barplot showing the relative frequencies and a corresponding table
mymult()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.