mercredi 1 juillet 2020

How can I get the percentage of random variates in an interval? (Python)

let's say I generate 10000 normally distributed random variates with σ = 1 and μ = 0:

from scipy.stats import norm

x = norm.rvs(size=10000,loc=0,scale=1)

How can I get the percentage of random variates in [-1,1] or [-3,3]? How can I count the percentage that will fall into these intervals?




Aucun commentaire:

Enregistrer un commentaire