Description Usage Arguments Details Author(s) Examples
Graphs a simulation of the sample proportion of heads.
1 |
n |
An integer denoting the number of times the coin is tossed. |
p |
The probability of heads, which must be between 0 and 1. |
burn.in |
An integer denoting the number of initial coin tosses which should be omitted from the graph. |
log.scale |
Logical; indicating whether or not the x-axis should have a logarithmic scale. |
col |
A vector of two colors, where the first color is used for the graph of the sample proportions,
and the second color is used for the horizontal line occurring at the value |
... |
Optional arguments to be passed to the |
This function coin.toss
illustrates the Law of Large Numbers for proportions,
by simulating cumulative sample proportions.
Using nonzero burn.in
typically reveals greater precision in the graph
as the number of coin tosses increases.
Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.