Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get_rate <- function(m, x_zero, r, t) {
- rate = m*x_zero * (exp(r*t) - 1) / r
- return(rate)
- }
- m = 0.0001
- r = 0.01
- x_zero = 10
- times <- 1:1000
- probabilities_at_least_1000 <- numeric(length = length(times))
- for(t in times)
- {
- prob_at_leat_1000[t] <- ppois(q=1000,
- lambda = get_rate(m, x_zero, r, t=t),
- lower.tail = F)
- }
- plot(times, prob_at_leat_1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement