Learn R Programming

discreteRV (version 1.2.2)

iid: Probability mass function of X^n

Description

Probability mass function of X^n

Usage

iid(X, n = 2, sep = ",", fractions = attr(X, "fractions"))

Arguments

X
random variable
n
power
sep
separator between items from marginal distributions, by default set to ","
fractions
If TRUE, return the probabilities as fractions

Examples

Run this code
d <- RV(c("A","B","C"), odds = c(3,5,11))
d2 <- iid(d)
probs(d2)

Run the code above in your browser using DataLab