Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-389

Normal MLE Sigma Known Mean

Problem

With the mean known, the maximum likelihood estimate of sigma is sqrt(mean_i (x_i - mu)^2) using n rather than n - 1.

Given the values and the known mean, return the MLE of sigma.

Hint

The MLE divides by n, unlike the unbiased sample standard deviation.

Test cases

case 1
in: [[1,3],2]
expected: 1
case 2
in: [[2,4,4,2],3]
expected: 1
case 3
in: [[0],0]
expected: 0
Starter codePython
def normal_mle_sigma_known_mean(values, mu):
    # Your code here
    pass

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