{'fraction_non_alphanumeric': 0.023303251328965262, 'fraction_numerical': 0.008530102608480652, 'mean_word_length': 4.666900175131349, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Understanding and visualizing the statistical analysis of SN1987A neutrino data

The SN1987A detection through neutrinos was an event of great importance in neutrino physics, being the first detection of neutrinos created outside our solar system, and then inaugurating the era of experimental neutrino astronomy. The data have been largely studied in many different analysis, and has presented several challenges in different aspects, since both supernova explosion dynamics and neutrino flavour conversion in such extreme environment still have many unknowns. In addition, the low statistics also invoke the need of unbinned statistical methods to compare any model proposal with data. In this paper we focus on a discussion about the most used statistical analysis interpretation, presenting a pedagogical way to understand and visualize this comparison.


Introduction
Particle physics provides a fertile ground to a vast number of methods to statistically compare theory and data, giving a quantitative filling in order to guide the prospects of a theory, or even reveal important accomplishments or tensions in experimental efforts.
In general, the theory can visually (and intuitively) be compared to data for most of the methods, but one interesting phenomena, the neutrino burst detected from the supernova SN1987A, that is particularly affected by low statistics, evidence difficulties to such parallel.
In this paper we propose a visual understanding to handle this difficulty through an animation of a parameterized model and SN1987A antineutrino data.

Statistical Analysis
The quantitative comparison between theoretical predictions and experimental results is a major part of any scientific endeavour. As in many other areas, in particle physics 1 arXiv:2108.06448v1 [hep-ph] 14 Aug 2021 an important quantity around such comparison is made is the detection rate of a specific event. As an example, theoretical models of solar neutrino production provide us with a steady theoretical neutrino flux. Solar neutrino experiments provides us with a detected event rate. The comparison between these two quantities can be done by translating the theoretical flux in an expected event rate, or inversely, translating the detected event rate in a compatible expected flux.
Besides, a lot of information can be extracted from the dependence of neutrino flux with its energy or time of detection. The most straightforward way to include this information on statistical analysis would be to split the total data into bins of specific energy or time intervals. Maybe the most spread statistical tool to implement these kind of analysis would be to calculate the following χ 2 : where the indices i and j track the binning of the data, R th k is the theoretical prediction and R ex k is the experimental data. This analysis has one great advantage: it allows to visually grasp how good is the accordance between theory and experiment in a figure where experimental data points, uncertainties and theoretical predictions can be plotted together.
If theoretical predictions are contained inside the region around the experimental data points delimited by the uncertainties, than we expect a good fit.
Several examples in neutrino physics can illustrate such procedure. Again taking solar neutrinos as an example, the data presented by the neutrino detector Super-Kamiokande is divided both in energy and time bins. In Figure 1 the data of 1496 days of running experiment are presented, and the binning on energy and time can be seen, although the binning in time is indirect, through a binning in the position of the Sun when the data was taken. The continuous line represent the prediction for the best fit point of the statistical analysis when flavour conversion is considered in two scenarios, the LMA and the LOW solutions.
As discussed, it is possible to visually get a feeling about how good the accordance between experimental data and theoretical predictions by how the theoretical curves cross the region around the experimental data within the error bars. For this particular example, two solutions to the solar neutrino problem are presented, with large mixing angle and large ∆m 2 (LMA) and lower ∆m 2 (LOW). We can expect by visually inspecting the figure that both solutions would fit the data quite well, fact that is confirmed by a more careful statistical analysis.
The problem of this visualization is when there is no efficient way to collect the data to form bins, for instance, due to the low event rate. In particular, when the event rate is very low it is necessary to take the experimental data event by event.
In this context, what we propose here is to recover a way to visually access how good the accordance between experimental data and theoretical prediction in a particular scenario when the statistical analysis is done event by event: the neutrino data from Supernova 1987A.

Supernova 1987A
The Core Collapse Supernova is a remarkable end of life of a star and one of the most peculiar astrophysical phenomena. Despite being a prominent optical phenomena, its most outstanding property is the powerful release of ∼ 99% of gravitational binding energy, generally in the order of ∼ 10 53 erg, from a m 10M progenitor star in (anti)neutrinos of all flavors in MeV scale.
Nevertheless the high neutrino luminosity, a limitation in the neutrino observation on Earth is related to the high distance D from the source, with decreasing flux proportional to D −2 , restricting the possible region for neutrino burst detection to a galactic or nearby the Milky Way, that possesses a low supernova rate of ∼ 1 per century [2].
Even though, in 1987, three detectors, Kamiokande II [3], IMB [4,5] and Baksan [6], were capable to observe a neutrino signal associated to a SN in the Large Magellanic Cloud (∼ 50 kpc). These data are presented in Figure 2. In contrast with Super-Kamiokande data in Figure 1, these are individual events, and there is no obvious way to overlap a theoretical curve to them. Since the theoretical models provide a flux density and any kind of binning to convert this density into a event probability would be quite arbitrary, the approach through an unbinned maximum likelihood estimation is a robust alternative to confront the theoretical hypothesis with these individual events. In next section we describe such procedure.

Modelling SN1987A event-by-event likelihood
Frequently the likelihood treatment in particle physics involves the usage of Poisson distribution P (µ, n), that fits well to phenomena that has small probability to occur, but a large number of tries. Given a measured variable set x, the Poisson likelihood is given by: where n i can be a particular number of events that occurs in a x i + δx i interval of our variable, in a number N of intervals, or bins, and µ(x i ) is the expected value in the same interval. It is convenient to write µ(x i ) as a distribution function on the variable x i , or δx i and number of counts n i . Including it in equation (2): However, binning the data to use a single expected value of a set of points requires to assume a given statistical distribution of such a bin, that generally is assumed to be Gaussian for higher number of entries. The low statistics scenario does not allow this assumption, then it is possible to model the likelihood (3) to account for each event apart.
This can be made by taking the bin to an infinitesimal width δx → dx and number of counts n i → 1, so we consider only infinitesimal bins with one event and drop the others, that also has the change from total number of bins N bins to total number of observed events N obs . The idea behind maximum likelihood is to maximize the quantity in (4), or given the correspondence L = e −χ 2 /2 , minimize the χ 2 ( x) = −2 log L( x) to respect to a free set of parameters x. If we have a single event at x =x, this expressions reduces to For different models with a normalized expected event rate R(x)dx, the likelihood is maximized for the model with the highest value of R(x i ). And letting the normalization runs freely, it is maximized for R(x)dx = 1. It is straightforward to note that if we consider more than one single event this maximum occurs on the total number of events.
In a supernova detection, such as SN1987A, the variables x are the neutrino energy, the detection time and events scattering angle, i.e. R = R(t, E, cos θ). Then eq. (4) becomes: where R is a triply differential equation, R = d 3 N dt dE d cos θ and N is the expected number of events at the detector. For simplicity we did not include the scattering angle dependence on the animations presented in the following, although they were used in the likelihood calculation. A complete analysis, including other details such as background, energy resolution and efficiency can be seen in [7], [8] and [9].

Single event distribution
The main ingredient to construct the likelihood is the theoretical triply differential expected rate. However, since there is no way to convert the theoretical predictions into some quantity to be compared with individual events, we can instead modify the events to match the theoretical probability distribution. For instance, all SN1987A events are published with an uncertainty in energy, so the true information we can take from each event is a probability distribution around some most probable result. Assuming such distribution to be Gaussian, a specific event with energyĒ ν and uncertainty σ E on timet with uncertainty σ t is related to the following probability distribution: This can be compared with the theoretical probability of inducing an event on the detector: where A is a proportionality factor that take into account the detector size and efficiency.
To proper visualize the data points being collected, we can create an animation with the detected event probability integrated on time. Since the uncertainty on time is very small, the distribution converges to a δ-function, and such animation would advance in steps while the data gets collected: Such animation is presented in Figure 3  phase and M a is the initial accreting mass [8]. The remaining three free parameters are a time offset t off to be adjusted independently for each detector.
These parameters are estimated from an event-by-event maximum likelihood, and the best fit values of our analysis, used in Figure 3, are: T a = 1.7 MeV, M a = 0.4 M , τ a = 0.62 s (9) As described before, the maximization on the likelihood depends on two terms. The term in the exponential factor factor is related to the number of events, and drives the theoretical parameters to those who provides the right expected number of events, i.e., the area under the curves in the end of the animation in Figure 3. It is quite easy to grasp if our theoretical model fits well the data by this aspect.
The second term access how close the theoretical curve is to the experimental one at the data central points, both in energy and in time. Since the uncertainty in time is negligible, we can visually compare the curves at the moments a new data is collected, providing us with a visual tool to this second ingredient of the statistical analysis. By performing these two analysis on Figure 3, we can expect that, although not perfect, the theoretical prediction would provide a reasonably good fit to the data.
It is useful now to analyse a set of theoretical parameters that do not fit well the data. This is done in Fig 4, where we chosed two set of parameters that are excluded at 90% C.L. according to our analysis. These parameters were chosen in a way to not change the total number of predicted events, so we can focus on the energy spectrum information. It is clear, again using a visual comparison, that these new set of parameters produce a worse fit to the data, fact that is confirmed by a full statistical analysis. 1 Once the detectors in 1987 were capable to measure a single channel, the inverse beta decay (νe + p → e + + n), only electron antineutrinos could be detected. according to our analysis. The green curve produces a distortion for low energy events, while the cyan produces a distortion that favour high-energy events. Also on light grey we present the best-fit point of our analyses, shown in Fig. 2. See the animation at: https://github.com/santosmv/Animations-visualizing-SN1987A-data-analysis/ As it was pointed out earlier, the two main neutrino observables that we are taking into consideration are the neutrino energy and the time of detection. After discussing the first on the above analysis, we will now focus on the second, and the best way to do this is the limits in neutrino mass that can be achieved using this statistical method.

Neutrino mass limits
An important remark is that the neutrino detection spread in time is an important source of physical information, allowing us to probe both Supernova explosion mechanisms and neutrino properties. The most important neutrino property that can be probed by such time spread is its mass.
The first difficulty in these kind of analysis is that the data itself does not allow us to correlate the time of arrival of the neutrino burst at the detectors with the unknown time at which the neutrinos left the Supernova. The solution is to use the data itself to establish, through statistical analysis, the match between the neutrino flux theoretical prediction and the data, taking the time of arrival of the first neutrino event in each detector as a marker.
The time of the following events, t i are taken as relative ones to the time of arrival of the first event, t 1 : and t 1 is left to vary freely to best match the theoretical prediction in a previously established time scale.
This simple picture arises when we assume massless neutrinos. In this case the relative time between events is identical to the relative time between the emission of these detected neutrinos on the production site, since the time delay due to the travel between the supernova and the detectors does not depend on the neutrino properties. In Fig. 3 it is assumed a vanishing mass neutrino, and the time showed on the animation correspond to the time since the supernova offset.
However, since the neutrinos have mass, neutrinos with different energies have different velocities, which changes the described scenario. More energetic neutrinos travels faster then less energetic neutrinos, meaning that the relative times between events does not correspond to relative times of the neutrinos emission. The correction is done by a simple kinematic analysis: where D is the distance to the supernova, and m and E are the neutrino mass and event energy. The sub-index p (d) refers to the time at production (detection). The emission time of each event is then calculated from the relative times δ i , and the kinematic corrections: For more details, we refere to [8,10].
Instead of making the correction on the time of the production, presented here to give proper credit to the authors that proposed and performed this analysis, we prefer to correct An animation evidencing this model dependent limit is shown in Fig. 5, for a 30 eV neutrino mass, and the same astrophysical parameters used to produce Fig. 3, and then with the same neutrino flux at the source. But due to the different time lag of neutrinos traveling to Earth with different energies, the time history of the expected number of events changes significantly, allowing us to place a limit on neutrino analysis using a proper statistical analysis.

Conclusion
This paper intended to present a pedagogical view of how to understand the likelihood analysis when an event-by-event treatment is necessary. The detection of SN1987A is a perfect example for that, once a lot of physics can be extracted by the few events that were collected through neutrino detection. It also has the interesting feature that different information can be extracted from the total expected number of events, its spectral distortion or its time structure. We present some animations as a visual tool to understand the statistical procedure, and produce a first impression on how different models fit the data.