Solution (source code)

= Solution

For equal one-second observation windows, the <sample mean> estimates the <Poisson distribution> mean:
$$
\boxed{\widehat\lambda=10192/12169\simeq0.83754.}
$$
This matches the expected mean count; it is also the <maximum-likelihood estimator> for independent <Poisson distribution> observations. With $N=12169$ windows, fitted expected frequencies are $E_j=N e^{-\widehat\lambda}\widehat\lambda^j/j!$ for $j=0,\ldots,4$, and $E_{\geq5}=N[1-\sum_{j=0}^4e^{-\widehat\lambda}\widehat\lambda^j/j!]$.

Each last-column entry is $(O_j-E_j)^2/E_j$, and the Pearson statistic is $\boxed{X^2=\sum_{j\in\{0,1,2,3,4,\geq5\}}(O_j-E_j)^2/E_j}$. The displayed expected frequencies and contributions are rounded, so their printed values need not reproduce every final digit of a calculation using unrounded probabilities.