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)

Curt-Younkin/RStudioConf2017 documentation built on May 6, 2019, 12:54 p.m.