pkgdown/in_header.html

Skip to contents

A ready-to-use CGF object for a single-parameter Geometric distribution. This corresponds to the count of failures before the first success. By default, this object is vectorized for i.i.d. replicates of probability prob.

Usage

GeometricCGF

Format

An object of class CGF (R6), with usual methods: K, K1, K2, K3operator, K4operator, etc.

Examples

# expected value of X~Geometric(prob = 0.3) via CGF
GeometricCGF$K1(0, 0.3)
#> [1] 2.333333