I am trying to create random numbers that follow the exponential distribution. The numbers should be between 0 and 18353. I am using the following code:
np.random.exponential(2400, 400)
which means that the output has 400 numbers and the scale parameter is 2400. However, 2400 is my estimation of the scaling parameter by plotting the random numbers.
sns.kdeplot(np.random.exponential(2000, 400))
sns.kdeplot(np.random.exponential(2400, 400))
sns.kdeplot(np.random.exponential(2300, 400))
plt.legend([r"$\beta = 1$",
r"$\beta = 2$",
r"$\beta = 3$"])
plt.show()
Is there anyway to calculate the scale parameter so that it gives us the numbers in a specific range?
Aucun commentaire:
Enregistrer un commentaire