ox_births_movie: Oxford Birth Times Simulation Movie

Description Usage Arguments Details Value See Also Examples

View source: R/ox_births_simulation_movie.R

Description

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.).

Usage

1
ox_births_movie(starting_n = 100, delta_n = 1000)

Arguments

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.

Details

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.

Value

Nothing is returned, only the animation is produced.

See Also

movies: general information about the movies.

Examples

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)

paulnorthrop/stat1004 documentation built on Nov. 17, 2019, 3:49 a.m.