loi B modif
Python
import numpy as np
import numpy.random as rd
import matplotlib.pyplot as plt
import time
p=0.5
nb_sim=5
N=2
X=np.zeros(nb_sim)
for k in range (nb_sim):
nb_succes=0
for _ in range (N):
if rd.random()<p:
nb_succes+=1
X[k]=nb_succes
print(X)
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.