probability: Probability

Description Usage Arguments Value Examples

View source: R/dist.R

Description

Generic function to compute the empirical probability of an event.

Usage

1
probability(d, event)

Arguments

d

Dist object representing the distribution.

event

Numeric representing the observed event.

Value

Numerical giving the empirical probability of event.

Examples

1
2
3
d <- Dist(c(0, 1, 2, 3, 4, 5))
for (i in 1:length(d))
  cat("event", i, "probability", probability(d, i), "\n")

rinform documentation built on April 1, 2018, 12:12 p.m.