Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

z_californianus Apr 9th, 2020 185 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rom matplotlib import pyplot as plt
  2. from math import factorial
  3.  
  4. p = .2  # add your code here: what is the probability of drawing up a contract?
  5. n = 30  # add your code here: how many companies will we negotiate with?
  6.  
  7. distr = []  # add your code here: create a variable for the distribution value
  8.  
  9. for k in range(0, n+1):
  10.     c = factorial(n)/(factorial(k) * factorial(n-k))
  11.     prob = c * p**k * (1-p)**(n-k)
  12.     distr.append(prob)
  13. plt.bar(
  14.     range(0, n+1),
  15.     distr
  16. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top