Calculating the mean value of a poisson distribution

I have a set of three observations taken from a poisson distribution:

• The probability of event e occurring at a frequency of 0 is 2.959%
• The probability of event e occurring at a frequency of 1 is 10.419%
• The probability of event e occurring at a frequency of 2 is 18.337%

Given this information only, is there any way to calculate this distribution's mean value?

If this is possible, and I have even less information from the same distribution:

• The probability of event e occurring at a frequency of either 0, 1, or 2 is 31.715%

Is it still possible to calculate the mean?

• Poisson observations are integers, but these seem to be $P(X=0),P(X=1),P(X=2)$ respectively. If that's the case, the distribution of $X$ cannot be Poisson. – gunes May 31 at 18:15
• For a Poisson RV, $P(X=0)=e^{-\lambda},$ so $-\ln[P(X=0)] = \lambda.$ Also, $P(X=1)/P(X=0) = \lambda.$ It's Sumday morning before coffee, but I don't get the same value of $\lambda$ both ways. Are your 'probabilities' supposed to be exact, or are they estimates based on a small bit of data? – BruceET May 31 at 18:38
• The code that I wrote to calculate this was also done on Sunday morning without coffee, so I fear there is an error in it... Your answer is very helpful though! – Matt May 31 at 18:46

Given this information only, is there any way to calculate this distribution's mean value?

Yes. The Poisson probability mass function is: $$P(x; \lambda)=\tfrac{e^{-\lambda} \lambda^x}{x!}$$ for $$x=0,1,2,3,...$$. It only has one parameter so you only need one data point to estimate $$\lambda$$. With multiple points you can estimate the coefficient which provides the best fit. The Binned Least-Squares Fit method illustrated in this stack overflow discussion gives pretty much what you want. I've adopted the code from that post to work with your example and with the case of starting with probabilities.

import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from scipy.stats import poisson

bins = [0,1,2]
entries = [0.02959, 0.10419, 0.18337]

plt.bar(x = bins, height = entries, label = "Data")

def fit_function(k, lamb):
'''poisson function, parameter lamb is the fit parameter'''
return poisson.pmf(k, lamb)

# fit with curve_fit
parameters, cov_matrix = curve_fit(fit_function, bins, entries, p0=3)

# plot poisson-deviation with fitted parameter
x_plot = np.arange(0, 6)

plt.plot(
x_plot,
fit_function(x_plot, *parameters),
marker='o', linestyle='',
color= "red",
label=f'Best fit:  λ = {round(parameters[0],4)}',
)
plt.legend()
plt.show()


Here is the output:

If this is possible, and I have even less information from the same distribution: The probability of event e occurring at a frequency of either 0, 1, or 2 is 31.715%

Yes. \begin{aligned} P(0,1,2;\lambda)&=P(0;\lambda)+P(1;\lambda)+P(2;\lambda)\\ &=\tfrac{e^{-\lambda} \lambda^0}{0!} + \tfrac{e^{-\lambda} \lambda^1}{1!} + \tfrac{e^{-\lambda} \lambda^2}{2!}\\ &=e^{-\lambda} +e^{-\lambda} \lambda + \tfrac{e^{-\lambda} \lambda^2}{2}\\ \\ \text{Solve: } \;\; &e^{-\lambda} +e^{-\lambda} \lambda + \tfrac{e^{-\lambda} \lambda^2}{2}=0.37 \end{aligned}

• Thank you very much! – Matt May 31 at 19:43