Geom_Sim: Simulation for Geometric Distribution

Description Usage Arguments Details Author(s) See Also Examples

Description

A simple function to understand the algorithm to simulate (psuedo-)observations from binomial distribution. It is an implementation of the algorithm given in Section 11.3.1 "Simulation from Discrete Distributions", and as such the function is not an alternative to the "rgeom" function.

Usage

1
Geom_Sim(p, n)

Arguments

p

probability of success

n

number of pseudo-observations required

Details

To simulate a random number from geometric RV, we make use of the algorithm described in the book.

Author(s)

Prabhanjan N. Tattar

See Also

rgeom

Examples

1
mean(Geom_Sim(0.01,10))

Example output

[1] 80.9

ACSWR documentation built on May 2, 2019, 6:53 a.m.