Advertisement
Guest User

Untitled

a guest
Feb 26th, 2021
348
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement