# Application of the Approximate Bayesian Computation Algorithm to Gamma-Ray Spectroscopy
## 5 Net Peak Area Extraction and ABC
### Abc
Simulation results indicate that ABC is well calibrated at the 90%, 95%, and 99% posterior probability intervals for each model parameter of ineptest, and provides an effective estimate of the RMSE in a frequentist sense, with the average posterior standard deviation across the \(10^{5}\) simulations in close agreement with the RMSE. Additionally, the RMSE in peak area estimation (peak area is calculated as area \(=h_{1}\times\sigma_{1}\sqrt{2\pi}\) from Equation (1)) is 0.28 (repeatable across sets of \(10^{5}\) simulations to within \(\pm 0.01\)) for the parametric based on simdata1 and 0.29 for the nonparametric method with the true model is the same as the assumed model (model 1 is the true model and model 1 is the assumed model with model 1 defined as in Figure 6). When the true model is model 1 but the assumed model is model 2 (by setting P2 = P4 = 0 in Equation (1) as explained in Section 2), the RMSE remains 0.29 for the nonparametric method but increases to 0.38 for the parametric method. Recall that ABC does not require one to explicitly specify a likelihood. Therefore, the true likelihood used to generate the data need not be known to the user. Synthetic data are generated from the model for many trial values of \(\theta\) and trial \(\theta\) values are accepted as contributing to the estimated posterior distribution for \(\theta|x_{\text{obs}}\) if the distance \(d(x_{\text{obs}},x(\theta))\) between \(x_{\text{obs}}\), and \(x(\theta)\) is reasonably small. Alternatively, for most applications, it is necessary to reduce the dimension of \(x_{\text{obs}}\) to a small set of summary statistics \(S\) and accept trial values of \(\theta\) if \(d(S(x_{\text{obs}}),S(x(\theta)))<\varepsilon\), where \(\varepsilon\) is a user-chosen threshold. Here, for example, \(x_{\text{obs}}\) is the gamma count rate in a specified subset of energy channels, and \(\theta\) specifies which isotopes are present and in what amounts. Figure 5: (**a,b**) fit one peak to one peak, and (**c,d**) fit one peak to two close peaks. Recall that, because trial values of \(\theta\) are accepted if \(d(S(x_{obs}),S(x(\theta)))<\varepsilon\), an approximation error to the posterior distribution arises that several ABC options attempt to mitigate. Additionally, recall that such options weigh the accepted \(\theta\) values by the actual distance \(d(S(x_{obs}),S(x(\theta)))\) (abctools package in R [33]). In practice, the true posterior distribution is not known, so a method such as that in [25; 26; 37] using the calibration checks described above, is needed in order to choose an effective value for the threshold. ABC can be used to evaluate candidate summary statistics. For any inference option, the estimated distribution of plausible peak parameters (or isotope subset in the full RID application) can be assessed by checking at least two criteria: (1) whether the estimated standard deviations agree with the observed standard deviations, and (2) whether the actual coverage of coverage intervals is close to the nominal. For example, a 95% probability interval construction method (frequentist or Bayesian) should contain the true nuclear material mass in approximately 95% of the repeated applications. ABC is used here for two main reasons:  
1. ABC allows for an easy comparison of the performance of candidate summary statistics such as peak area ratios, off-peak count rates, and goodness-of-fit test results such as scan statistic values near peaks. 2. ABC allows for easy experimentation with different DRFs. As an example, for the spectra in Figure 7, Figure 8 plots an ABC-based estimate of the posterior probability density function (pdf) for peak location, using either raw or smoothed data. To implement ABC, \(10^{5}\) simulations of both raw and smoothed spectra were generated by sampling from the prior distribution, which spanned a range of peak locations, areas, and widths.