Description Usage Arguments Details Value See Also Examples
View source: R/ox_births_simulation_movie.R
A movie to illustrate that as we increase the size of a sample simulated from a continuous probability distribution a histogram of these data gives a closer approximation to the underlying probability density function (p.d.f.).
1 | ox_births_movie(starting_n = 100, delta_n = 1000)
|
starting_n |
A numeric scalar. The size of the first sample to be simulated. |
delta_n |
A numeric scalar. The amount by which the sample size is increased (or decreased) after one click of the + (or -) button in the parameter window. |
ox_births_movie
first fits a
gamma distribution
(see GammaDist
) to the time
data in the
ox_births
data. Then we simulate samples (using
rgamma
) from the fitted gamma distribution and produce a
histogram of the simulated data. The p.d.f. of the fitted gamma distribution
is superimposed on the histogram.
We will not study the gamma distribution in STAT0002, but you will encounter it in STAT0003 if you take that next term.
Nothing is returned, only the animation is produced.
movies
: general information about the movies.
1 2 3 4 5 6 7 8 | # Load package rpanel
# [Use install.packages("rpanel") if necessary]
library(rpanel)
## Not run:
ox_births_movie()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.