Abstract
In recent years, advances in analysis software have made it possible to automatically perform data analysis for simple, single-spectrum analyses. This is crucial for ensuring the reproducibility and objectivity of data analysis. However, there is a growing concern that this automation may turn data analysis into a black box, leading to situations where analysis is conducted through unnatural processes without users even realizing it. This issue is also prevalent in the analysis of spectral data. In this article, we introduce a small part of the mathematical structure of spectral analysis within the framework of Bayesian statistics, with a particular focus on the design of the error function. Additionally, we also show that the Bayesian statistical framework naturally leads to integrated analysis of multiple spectra, as would be achieved by a skilled analyst.