Skip to content
DeepForgeby svx
All problems
EasyProbabilitypr-377

Variance of Sample Mean

Problem

For n independent observations with variance sigma^2, the sample mean has variance sigma^2 / n.

Given sigma and n, return the variance of the sample mean.

Hint

Averaging shrinks variance by the sample size.

Test cases

case 1
in: [2,4]
expected: 1
case 2
in: [1,100]
expected: 0.01
case 3
in: [10,25]
expected: 4
Starter codePython
def variance_of_sample_mean(sigma, n):
    # Your code here
    pass

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