Skip to content
DeepForgeby svx
All problems
MediumProbabilitypr-407

Normal MGF at Point

Problem

The normal moment generating function is exp(mu t + sigma^2 t^2 / 2).

Given mu, sigma, and t, return M(t).

Hint

The exponent is linear plus quadratic in t.

Test cases

case 1
in: [0,1,1]
expected: 1.6487212707001282
case 2
in: [2,0.5,0]
expected: 1
case 3
in: [1,2,0.5]
expected: 2.718281828459045
Starter codePython
def normal_mgf_at_point(mu, sigma, t):
    # Your code here
    pass

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