Learn R Programming

lestat (version 1.9)

expectation: Compute Expectation

Description

Compute the expectation of a probability distribution.

Usage

expectation(object)

Arguments

object

A probability distribution.

Value

The expectation of the probability distribution.

See Also

variance

Examples

Run this code
# NOT RUN {
expectation(normal(3, log(2)))
expectation(binomialdistribution(7, 0.3))
# }

Run the code above in your browser using DataLab