Premium problem46. Family-Wise False Positive Rate

Medium Locked

You run m independent tests, each at significance threshold alpha, and the null is true for all of them. Return the probability of at least one false positive somewhere in the family.

P(at least one)=1−(1−α)mP(\text{at least one}) = 1 - (1 - \alpha)^m

This is the number that motivates the Bonferroni correction: twenty tests at 0.05 each are more likely than not to produce a "significant" result from pure noise.

Input

alpha = 0.05
m = 20

Output

0.6415140775914581

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)