I create a truncated exponential distribution:
from scipy.stats import truncexpon
truncexp = truncexpon(b = 8)
Now I want to sample 8 points from this distribution, such that their mean with be approximately 4. What is the best way to do it without making a huge loop to randomly sample until the mean is close enough?
Aucun commentaire:
Enregistrer un commentaire