Skip to content
DeepForgeby svx
All problems
MediumProbabilitypr-355

Poisson Moments Mean Variance

Problem

The Poisson distribution has mean and variance both equal to lambda.

Given lambda, return [mean, variance].

Hint

Equidispersion is the defining property.

Test cases

case 1
in: [2]
expected: [2,2]
case 2
in: [0.5]
expected: [0.5,0.5]
case 3
in: [10]
expected: [10,10]
Starter codePython
def poisson_mean_and_variance(lam):
    # Your code here
    pass

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