All problems
Funnel Asymmetry
Problem
Split studies at the median standard error (the k//2 smallest versus the rest) and return the difference in fixed-effect pooled means (small-SE group minus large-SE group). Return 0.0 when fewer than two studies are given, any se <= 0, or a split group is empty.
Hint
If small studies report larger effects, the funnel leans to one side.
Test cases
case 1
in: [[1,0.8,1.2,0.5],[0.1,0.2,0.15,0.3]]
expected: 0.3538461538461537
case 2
in: [[1,1],[0.1,0.2]]
expected: 0
case 3
in: [[0.5,0.5,0.5,0.5],[0.1,0.2,0.3,0.4]]
expected: 0
case 4
in: [[1],[0.1]]
expected: 0
case 5
in: [[2,1.5],[0.1,0.4]]
expected: 0.5
Starter codePython
def funnel_asymmetry(yi, sei):
# Your code here
pass5 test cases · run your code against them in the editor