distrEx (version 0.4-4)

illustrateCLT: Generic Function for Illustrating the CLT

Description

Generic function for generating a sequence of plots of the density and cdf of the consecutive standardized and centered sums of iid r.v. distributed according to a prescribed discrete or absolutely continuous distribution compared to the standard normal.

Usage

illustrateCLT(Distr, ...)
## S3 method for class 'AbscontDistribution':
illustrateCLT(Distr, len, sleep = 0)
## S3 method for class 'DiscreteDistribution':
illustrateCLT(Distr, len, sleep = 0)

Arguments

Distr
object of class "AbscontDistribution" or class "DiscreteDistribution": distribution of the summands
len
integer: up to which number of summands plots are generated
sleep
numeric: pause between subsequent plots
...
addtional arguments for methods not yet implemented

Value

  • void

concept

  • convex contamination
  • gross error

Examples

Run this code
distroptions("DefaultNrFFTGridPointsExponent" = 13)
illustrateCLT(Distr = Unif(), len = 20)
distroptions("DefaultNrFFTGridPointsExponent" = 12)
illustrateCLT(Distr = Pois(lambda = 2), len = 20)
distroptions("DefaultNrFFTGridPointsExponent" = 13)
illustrateCLT(Distr = Pois(lambda = 2)+Unif(), len = 20)

Run the code above in your browser using DataCamp Workspace