= 10000
n_rep
= 60
t
= 12
lambda
= 5
mu
= 1.5
sigma
= rep(NA, n_rep)
N = rep(NA, n_rep)
X
for (i in 1:n_rep) {
= rpois(1, lambda * t)
N[i]
= sum(rnorm(N[i], mu, sigma))
X[i]
}
hist(X)
mean(X)
[1] 3599.934
sd(X)
[1] 139.1417