Learn R Programming

discreteRV (version 1.2.2)

SofIID: Sum of independent identically distributed random variables

Description

Sum of independent identically distributed random variables

Usage

SofIID(X, n = 2, progress = TRUE, fractions = attr(X, "fractions"))

Arguments

X
A random variable
n
The number of Xs to sum
progress
If TRUE, display a progress bar
fractions
If TRUE, return the probabilities as fractions

Examples

Run this code
X.Bern <- RV(c(1,0), c(.5,.5))

S5 <- SofIID(X.Bern, 5)
S128 <- SofIID(X.Bern, 128)

Run the code above in your browser using DataLab