Skip to content
DeepForgeby svx
All problems
EasyTime Seriests-331

White Noise Mean Variance

Problem

Compute the variance of the sample mean of h independent white-noise observations, each with variance sigma2. Averaging reduces the variance to sigma2 / h.

Return 0.0 when h is not positive.

Hint

Averaging over more independent observations shrinks the variance linearly.

Test cases

case 1
in: [4,2]
expected: 2
case 2
in: [1,1]
expected: 1
case 3
in: [6,3]
expected: 2
case 4
in: [2,0]
expected: 0
Starter codePython
def white_noise_mean_variance(sigma2, h):
    # Your code here
    pass

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