Skip to content
DeepForgeby svx
All problems
HardStatisticsst-137

Wild Bootstrap Standard Error

Problem

Return the wild bootstrap standard error of the mean: center the data, multiply each centered value by a random sign from the seeded Lehmer RNG (an even draw means +1, an odd draw means -1), and take the population standard deviation of the resulting bootstrap means. Return 0.0 for empty data or n_boot <= 0.

Hint

Random signs preserve heteroscedasticity without permuting values.

Test cases

case 1
in: [[1,2,3,4,5],200,7]
expected: 0.6105603983227211
case 2
in: [[5,5,5],100,1]
expected: 0
case 3
in: [[1,2],100,3]
expected: 0.3054095610815091
case 4
in: [[],10,1]
expected: 0
case 5
in: [[10,20,30],50,42]
expected: 4.349201714746692
Starter codePython
def wild_bootstrap_se(data, n_boot, seed):
    # Your code here
    pass

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