library(EstimationTools)
#----------------------------------------------------------------------------
# Example 1: Poisson expected value computation, X ~ Poisson(lambda = 15)
Poisson_integrand <- function(x, lambda) {
x * lambda^x * exp(-lambda)/factorial(x)
}
summate(fun = Poisson_integrand, lower = 0, upper = Inf, lambda = 15)
#----------------------------------------------------------------------------
Run the code above in your browser using DataLab