Skip to content
DeepForgeby svx
All problems
EasyCalculusca-249

Cramer-Rao Lower Bound

Problem

For n independent samples from N(mu, sigma^2) with known variance, the Cramer-Rao lower bound on the variance of any unbiased estimator of mu is sigma^2 / n.

Given sigma and n, return that bound.

Hint

More samples or a smaller variance lower the bound quadratically.

Test cases

case 1
in: [1,1]
expected: 1
case 2
in: [2,4]
expected: 1
case 3
in: [0.5,10]
expected: 0.025
case 4
in: [3,2]
expected: 4.5
Starter codePython
def cramer_rao_bound(sigma, n):
    # Your code here
    pass

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