Skip to content
DeepForgeby svx
All problems
MediumStatisticsst-384

Poisson PMF Value

Problem

The Poisson pmf is exp(-lambda) * lambda^k / k!.

Given the rate lambda and the count k, return the probability.

Hint

The exponential factor is outside the power and factorial.

Test cases

case 1
in: [2,3]
expected: 0.1804470443154836
case 2
in: [0.5,0]
expected: 0.6065306597126334
case 3
in: [1,1]
expected: 0.36787944117144233
Starter codePython
def poisson_pmf_value(lam, k):
    # Your code here
    pass

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