Find minimal binomial N that ensures ezpermutations
obtains nperm
unique permutations.
Let X~binom(N, p=prob.nonrej), so P(X>nperm)<ε <–> Np-8√{Npq}-nperm=0
<–> √{N}=(\frac{8√{pq}+√{64pq + 4 \cdot p \cdot nperm}}{2p}) by quadratic formula in √{N}.
1 | opt_binom_n(p, nperm)
|
p |
Probablity a resample is successful. |
nperm |
Number of resamples to return. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.