All problems
Sequential Boundary
Problem
Return the O'Brien-Fleming-style critical boundary z_alpha/sqrt(t) at information fraction t with 0 < t <= 1. Return 0.0 when t is outside that range.
Hint
The boundary is strict early and relaxes to the fixed-sample critical value at the end.
Test cases
case 1
in: [1.96,0.5]
expected: 2.7718585822512662
case 2
in: [1.96,1]
expected: 1.96
case 3
in: [1.96,0.25]
expected: 3.92
case 4
in: [2.576,0.5]
expected: 3.643014136673093
case 5
in: [1.96,0]
expected: 0
Starter codePython
def sequential_boundary(z_alpha, information_fraction):
# Your code here
pass5 test cases · run your code against them in the editor