SofI: Sum of independent random variables

Description Usage Arguments Examples

Description

Sum of independent random variables

Usage

1
SofI(..., fractions = attr(list(...)[[1]], "fractions"))

Arguments

...

Arbitrary number of random variables

fractions

If TRUE, return the probabilities as fractions

Examples

1
2
3
4
5
X.Bern <- RV(c(1,0), c(.5,.5))
X.fair.die <- RV(1:6, rep(1/6,6))

S5 <- SofI(X.Bern, X.Bern, X.Bern, X.Bern, X.Bern)
S.mix <- SofI(X.Bern, X.fair.die)  # Independent but not IID

Example output

Attaching package: 'discreteRV'

The following object is masked from 'package:base':

    %in%

discreteRV documentation built on May 2, 2019, 11:04 a.m.