powered by
Generic function to compute the empirical probability of an event.
event
probability(d, event)
Dist object representing the distribution.
Numeric representing the observed event.
Numerical giving the empirical probability of event.
# NOT RUN { d <- Dist(c(0, 1, 2, 3, 4, 5)) for (i in 1:length(d)) cat("event", i, "probability", probability(d, i), "\n") # }
Run the code above in your browser using DataLab