| expectation.poisson_dist | R Documentation |
Computes E[g(X)] using truncated summation over the support.
The summation is truncated at the 1 - 10^{-12} quantile to
ensure negligible truncation error.
## S3 method for class 'poisson_dist'
expectation(x, g, ...)
x |
A |
g |
A function to take the expectation of. |
... |
Additional arguments passed to |
The expected value E[g(X)].
x <- poisson_dist(5)
expectation(x, identity)
expectation(x, function(k) k^2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.