Learn R Programming

distionary (version 0.1.0)

dst_finite: Finite Distribution

Description

Makes a finite distribution, which is a distribution with a finite number of possible outcomes.

Usage

dst_finite(outcomes, probs)

Value

A distribution with finite outcomes.

Arguments

outcomes

Numeric vector representing the potential outcomes of the distribution.

probs

Numeric vector of probabilities corresponding to the outcomes in outcomes. Must not be negative and must sum to 1.

See Also

dst_empirical()

Examples

Run this code
dst_finite(2:5, probs = 1:4 / 10)

Run the code above in your browser using DataLab