Skip to contents

A distribution on finitely many weighted atoms. finite_dist() is the standard instance, dirac() builds a one-atom finite_dist().

Usage

discrete_dist(sample_space = space())

Arguments

sample_space

The space this is a law over. Derived by concrete subclasses, never passed by a caller.

Examples

S7::S7_inherits(
  finite_dist(atoms = rbind(c(0.6, 0.4)), weights = 1),
  discrete_dist
)
#> [1] TRUE