Skip to content

Instantly share code, notes, and snippets.

@rayryeng
Created July 19, 2017 16:43
Show Gist options
  • Save rayryeng/9bf5b502c839532f498723883b458a20 to your computer and use it in GitHub Desktop.
Save rayryeng/9bf5b502c839532f498723883b458a20 to your computer and use it in GitHub Desktop.
In [5]: %paste
def prob(z0, N):
Psingle = (1 - 2 * z0 / (N - 3)) ** ((N - 5) / 2)
return Psingle
In [6]: z0 = 18.371832377470973
In [7]: N = 38
In [8]: prob(z0, N)
Out[8]: 1.4398561869814418e-21
In [9]: Psingle = (1 - 2 * z0 / (N - 3)) ** ((N - 5) / 2)
In [10]: Psingle
Out[10]: 1.4398561869814418e-21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment