Problem 1

We can see that after 5 days, the Poisson distribution is still Poisson- it has a right-hand tail on the linear plot and on the log plot looks sorta like a leaning parabola (not a real parabola like a Gaussian). Conceptually this makes sense because you would expect the same distribution of gamma-rays over multiple days as you would over a single day. Mathematically, most distributions go towards a Gaussian over many summations, but this is only 5 iterations, so not enough to look much like a Gaussian, and Poissons are discrete regardless, so they can never go fully towards a continuous distribution through just adding (and renormalizing) them. However, it would look more like a Gaussian after enough summation.

Averaging

As the days are averaged, we can see the peak stays near the original peak, unlike in the summation case. Here, the distributions are still Poisson, as above, but are getting closer to a Gaussian, as the central limit theorem says they should. Unlike in a pure sum, the distance between subsequent intervals (number of gamma-rays here) gets smaller in an average because you just rescale the x-axis each time, so in the limit of an infinite number of Poisson distributions in the average, the interval distance goes to zero and we get a true Gaussian distribution. However, the interval distance will get close enough to zero for numerical use long before that (although more days than averaged here).

Finding Sigma

To find sigma after N days, you convolve N of the original background distributions (Poissons with mean X), then integrate (or sum because the distribution is discrete) the resulting convolution from an x-value (number of gamma rays seen) of Y*N to infinity. This integral gives the probability, which you use as normal in a ppf function.

Problem 2

As you can see above, the more distributions that are averaged, the closer the resulting distribution becomes to a Gaussian. Using the log plot you can tell that after 7 days it's still not very close to a Gaussian (very antisymmetric curve, fast fall off on the left-hand side). After 50 averages it looks much closer to a Gaussian, but still is a little bit off- you can see the left-hand side is steeper than the right. That said, the y-axis also covers 300 or so orders of magnitude on the log plot, so in the area where probabilities are actually meaningful (we'll say the first 20 or so orders of magnitude here just to put a number on it) it is much closer to a Gaussian.

Problem 3

Version 1

Version 2

Statistical Question:
Part 1- What is the distribution associated with the background given that we are getting readings from 10,000 pixels at once?
Part 2- What is the statistical significance of the chosen candidate given this background distribution (in other words, what is the probability of seeing this candidate across the 10,000 pixels)?

Math Formulation:
Part 1- Distribution = background (1 pixel) No. pixels (10,000) = Gaussian 10,000. This is because we are just getting the same background from 10,000 pixels at once.
Part 2- Sum instances (y-values) from the signal strength (here Y = 8.2) onwards. Because this signal strength is near/in the tail of the distribution, this sum gives a decent approximation of what the probability would be. Then use the ppf function to get the associated sigma.

Problem 4

Using the cdf function with a given value returns the probability of getting that value. Thus, to get the version 1 required signal, we took the probability associated with 5 sigma (1 - 1/3.5e6), and used the inverse of the cdf function- the ppf function. This gave the signal value required to get a 5 sigma significance.
For version 2, the probability associated with 5 sigma is different because the distribution is scaled by the number of pixels (10,000). So in the ppf function we must now divide the probability of 5 sigma by the number of pixels.
The difference in brightness ends up being pretty small compared to the number of pixels (difference in brightness of 3 compared to 10,000 pixels). This makes sense because the distributions don't get any wider, they just get scaled vertically, so while the actual readings climb in volume massively, the rare readings are still very rare compared to the width of the distribution. If you continue to change the trials factor by more orders of magnitude, the 5-sigma sensitivity threshold will change, but likely only on the order of one order of magnitude (unless you introduce many more trials). As an example of much higher trial factors (numbers of pixels), there are some examples below.