I generated a Poisson distribution with mean equal to 3 and 10000 samples by using np.random.poisson(3,10000)
. The plot is the following:
from this plot I see that given the mean equal to 3, a point like 12 is very unlikely to fall into the distribution. Is there a function that given the number 12 and a probability to fall in the distribution, gives me the mean of such distribution ?
I know that from scipy.stats module there is the ppf function that returns the point such that given a mean of the distribution and the probability to have this point and the points lower than this, that is:
st.poisson.ppf(q = 0.99995,mu = 3)
It returns 12, hence I have a 99.995% probability that a Poisson with mean 3 returns a value that is 12 or less. Is there a function that does the opposite ? That given 0.95 and the number 12, gives me the right mean 3 ?