Learn R Programming

discreteRV (version 1.2.2)

joint: Joint probability mass function of random variables X and Y

Description

Joint probability mass function of random variables X and Y

Usage

joint(X, Y, sep = ",", fractions = (attr(X, "fractions") & attr(Y, "fractions")))

Arguments

X
random variable
Y
random variable
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 <- joint(d,d)
probs(d2)

Run the code above in your browser using DataLab