E: Expected value of a random variable

Description Usage Arguments Examples

Description

Expected value of a random variable

Usage

1
E(X)

Arguments

X

random variable

Examples

1
2
3
4
5
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)

Example output

Attaching package: 'discreteRV'

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

    %in%

[1] 0.5
[1] 3.5

discreteRV documentation built on May 2, 2019, 11:04 a.m.