All problems
Conditional Survival Exponential
Problem
The exponential distribution is memoryless: P(X > s + t | X > s) = exp(-rate * t).
Given the rate, s, and t, return the conditional survival probability.
Hint
The elapsed time s cancels out.
Test cases
case 1
in: [1,2,3]
expected: 0.049787068367863944
case 2
in: [0.5,0,1]
expected: 0.6065306597126334
case 3
in: [2,5,0]
expected: 1
Starter codePython
def conditional_survival_exponential(rate, s, t):
# Your code here
pass3 test cases · run your code against them in the editor