P: Compute the probability that an event occurs.

Description Usage Arguments Value Examples

Description

Compute the probability that an event occurs.

Usage

1
P(x)

Arguments

x

an event. An event is a special type of discrete random variable that only has two outcomes: TRUE or FALSE. It is usually created by applying a comparison operator to a random variable.

Value

a probability (numeric vector of length 1) between 0 and 1.

Examples

1
2
3
wheel <- rv(1:20)
P(wheel > 10)
P(wheel %% 2 == 0)

almartin82/rv2alm documentation built on May 10, 2019, 10:25 a.m.