# joint: Joint probability mass function of random variables X and Y In discreteRV: Create and Manipulate Discrete Random Variables

## Description

Joint probability mass function of random variables X and Y

## Usage

 ```1 2``` ```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

## Author(s)

Heike Hofmann [email protected]

## Examples

 ```1 2 3``` ```d <- RV(c("A","B","C"), odds = c(3,5,11)) d2 <- joint(d,d) probs(d2) ```

### Example output

```Attaching package: 'discreteRV'

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

%in%

Warning messages:
1: In RV(outcomes = as.character(S), probs = as.numeric(tmp), fractions = fractions) :
NAs introduced by coercion
2: In RV(outcomes = as.character(S), probs = as.numeric(tmp), fractions = fractions) :
NAs introduced by coercion
A,A        A,B        A,C        B,A        B,B        B,C        C,A
0.02493075 0.04155125 0.09141274 0.04155125 0.06925208 0.15235457 0.09141274
C,B        C,C
0.15235457 0.33518006
```

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