Skip to content
DeepForgeby svx
All problems
EasyProbabilitypr-056

Exponential Memoryless Check

Problem

Verify the memoryless property of the exponential distribution:

P(X > s + t | X > s) = P(X > t)

where P(X > x) = e^(-lam * x). Return True when the two sides agree within 1e-9.

Hint

The survival function of the exponential is exp(-lam * x).

Test cases

case 1
in: [1,2,3]
expected: true
case 2
in: [0.5,4,2]
expected: true
case 3
in: [2,0,5]
expected: true
Starter codePython
import math


def exponential_memoryless_check(lam, s, t):
    # Your code here
    pass

3 test cases · run your code against them in the editor