All problems
Cumulative Meta Step
Problem
Return the fixed-effect pooled mean after adding a new study to the existing evidence, weighting every study by 1/se^2. Return 0.0 when the new standard error or any existing standard error is not positive.
Hint
Each cumulative step reruns a fixed-effect inverse-variance average.
Test cases
case 1
in: [[0.5],[0.1],0.7,0.1]
expected: 0.6
case 2
in: [[0.5,0.5],[0.1,0.1],0.8,0.15]
expected: 0.5545454545454546
case 3
in: [[],[],0.4,0.2]
expected: 0.39999999999999997
case 4
in: [[0.2],[0],0.3,0.1]
expected: 0
case 5
in: [[0.1,0.2],[0.1,0.1],0.3,0.1]
expected: 0.19999999999999998
Starter codePython
def cumulative_meta_step(existing_yi, existing_sei, new_y, new_se):
# Your code here
pass5 test cases · run your code against them in the editor