Skip to contents

This function returns the probabilities of elements of the support of a given distribution as a numerical vector.

Usage

probs(dist)

# S4 method for class 'ddf'
probs(dist)

Arguments

dist

A ddf object, the distribution.

Value

Probabilities as a numerical vector.

Examples

probs(ddf(1:3))
#> [1] 0.3333333 0.3333333 0.3333333
probs(ddf(1:3, c(1 / 2, 1 / 4, 1 / 4)))
#> [1] 0.50 0.25 0.25