All problems
Family-Wise Error Rate
Problem
Return the family-wise error rate 1 - (1-alpha)^m for m independent tests at level alpha. Return 0.0 when m <= 0 or alpha <= 0, and 1.0 when alpha >= 1.
Hint
The chance of at least one false positive is the complement of all tests being clean.
Test cases
case 1
in: [0.05,10]
expected: 0.4012630607616213
case 2
in: [0.01,5]
expected: 0.04900995010000009
case 3
in: [0.05,1]
expected: 0.050000000000000044
case 4
in: [0.05,0]
expected: 0
case 5
in: [0,5]
expected: 0
Starter codePython
def family_wise_error_rate(alpha, m):
# Your code here
pass5 test cases · run your code against them in the editor