Last active
February 20, 2018 15:21
-
-
Save tvladeck/511a0d23ddea4e31f756c116ae1ccbfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# draw from an exponential distribution with mean 90 | |
payment_failures <- rexp(1000, rate = 1/90) | |
# number of payment failures after 90 days | |
pf_90 <- (payment_failures < 90) %>% sum | |
# number of payment failures after 60 days (assuming same distribution) | |
pf_60 <- (payment_failures < 60) %>% sum | |
# number of 90 day payment failures observed relative to 60 day payment failures | |
pf_90 / pf_60 | |
# 1.33833 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment