marginal: Marginal distribution of a joint random variable

Description Usage Arguments Author(s) Examples

View source: R/discreteRV-Probabilities.r

Description

Extracts the marginal probability mass functions from a joint distribution.

Usage

1
marginal(X, num)

Arguments

X

A random variable

num

Number indicating which marginal distribution to extract

Author(s)

Eric Hare [email protected]

Examples

1
2
3
AandB <- jointRV(outcomes = list(1:3, 0:2), probs = 1:9 / sum(1:9))
marginal(AandB, 1)
marginal(AandB, 2)

discreteRV documentation built on May 30, 2017, 2:21 a.m.