disc.exp | R Documentation |
Expected Value of a Discrete Random Variable
disc.exp(xv, xf, mt, dig = 3, prt = TRUE, plot = FALSE, pos = "topright")
xv |
Vector of random variable values |
xf |
Vector of probability (or frequency) distribution |
mt |
graph title |
dig |
Number of digits below the decimal point (default=3) |
prt |
Print detailed output? Default: FALSE |
plot |
Plot the PDF? Default: FALSE |
pos |
Legend location, Default: 'topright' |
list(Ex=expected value, Dx=standard deviation, Vx=variance)
p = c(1, 3, 3, 1) x = c(-3, -1, 1, 3)*100 disc.exp(x, p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.