Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-385

Exponential CDF Value

Problem

The exponential CDF is F(x) = 1 - exp(-rate * x) for x >= 0 and 0 otherwise.

Given x and the rate, return the probability.

Hint

The support starts at zero.

Test cases

case 1
in: [1,2]
expected: 0.8646647167633873
case 2
in: [0,5]
expected: 0
case 3
in: [-1,1]
expected: 0
Starter codePython
def exponential_cdf_value(x, rate):
    # Your code here
    pass

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