Advertisement
Guest User

Untitled

a guest
Feb 26th, 2021
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. In [16]: from numpy.random import binomial
  2.  
  3. In [17]: nHeads = binomial(500_001, 0.5, size=int(1e6))
  4.  
  5. In [18]: sum(nHeads == 250_000) / len(nHeads)
  6. Out[18]: 0.001171
  7.  
  8. In [19]: 1/800
  9. Out[19]: 0.00125
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement