mybin | R Documentation |
Simulates a binomial experiment with given iteration, sample size, and probability of success. Outputs a barplot and returns a table of the results.
mybin(iter = 100, n = 10, p = 0.5)
iter |
number of iterations (default iter=100) |
n |
sample size (default n=10) |
p |
probability of success (default p=0.5) |
From: MATH 4753 Lab 5
table of relative frequencies
sim100 = mybin(iter = 100, n = 10, p = 0.7) sim1000 = mybin(iter = 1000, n = 10, p = 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.