Skip to content

Instantly share code, notes, and snippets.

@dreidpath
Created June 17, 2016 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dreidpath/391cb6fa626fec0b48019818a74c9369 to your computer and use it in GitHub Desktop.
Save dreidpath/391cb6fa626fec0b48019818a74c9369 to your computer and use it in GitHub Desktop.
The probability (P_n) of an event in 1/n-th of the time if the probability of the event over the whole time is P
# Imagine that the probability of dying over a whole year is 0.5. Assuming risk is constant,
# what is the probability of dying in any single month? This trivial function (thank you Mark)
# ensures that the monthly-p results in an annual probability of 0.5. I wanted somewhere to
# remember it
p-Divide <- function(P, n){
1-(1-P)^(1/n)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment