Learn R Programming

discreteRV (version 1.2.2)

P: Calculate probabilities of events

Description

Calculate probabilities of events

Usage

P(event)

Arguments

event
A logical vector

Examples

Run this code
X.fair.die <- RV(1:6, rep(1/6,6))
P(X.fair.die>3)

X.loaded.die <- RV(1:6, odds = c(1,1,1,1,2,4))
P(X.loaded.die>3)
P(X.loaded.die==6)

Run the code above in your browser using DataLab