RVConditional: Defines a random variable conditional on an event.

Description Usage Arguments Examples

View source: R/random_variables.R

Description

RVConditionals are typically produced when you condition a RV on an Event object.

Usage

1
RVConditional(RV, condition_event)

Arguments

condition_event

(Event): the event to condition on

random_variable

(RV): the random variable whose conditional distribution is desired

Examples

1
2
X, Y = RV(Binomial(10, 0.4) ** 2)
(X | (X + Y == 5)) %>% draw() # returns a value between 0 and 5.

hayate0304/Rsymbulate documentation built on May 17, 2019, 8:20 a.m.