View source: R/RVofrandomselectRV.R
sumRV_margrow | R Documentation |
For a list of random variables, return random variable that is a random selection one of the RVs
sumRV_margrow(pmat)
pmat |
A matrix of probabilities. Each element creates a Bernoulli RV with probability of success (1), given by p. |
rvs |
A list of Random Variable (distributions) of class 'RV' |
library(discreteRV) X1 <- RV(c(1,0), c(.5,.5)) X2 <- RV(c(1,0), c(.5,.5)) X3 <- RV(c(1,-1), c(.5,.5)) randselRV(list(X1, X2, X3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.