| expectation | R Documentation |
f with respect to
x.Generic method for obtaining the expectation of f with respect to
x.
expectation(x, g, ...)
x |
The distribution object. |
g |
The function to take the expectation of. |
... |
Additional arguments to pass into |
The expected value of g(x).
x <- exponential(1)
# E[X] for Exp(1) is 1
expectation(x, function(t) t)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.