Skip to content
DeepForgeby svx
All problems
EasyProbabilitypr-111

Estimator MSE

Problem

The mean squared error of an estimator decomposes into squared bias plus variance:

MSE = bias^2 + variance.

Return the MSE.

Hint

Bias is squared, so its sign does not matter.

Test cases

case 1
in: [1,2]
expected: 3
case 2
in: [0,4]
expected: 4
case 3
in: [-0.5,0.25]
expected: 0.5
case 4
in: [0,0]
expected: 0
Starter codePython
def estimator_mse(bias, variance):
    # Your code here
    pass

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