Learn R Programming

discreteRV (version 1.2.2)

E: Expected value of a random variable

Description

Expected value of a random variable

Usage

E(X)

Arguments

X
random variable

Examples

Run this code
X.Bern <- RV(c(1,0), c(.5,.5))
E(X.Bern)

X.fair.die <- RV(1:6, rep(1/6,6))
E(X.fair.die)

Run the code above in your browser using DataLab