  We present an introduction to some concepts of Bayesian data analysis in the
context of atomic physics. Starting from basic rules of probability, we present
the Bayes' theorem and its applications. In particular we discuss about how to
calculate simple and joint probability distributions and the Bayesian evidence,
a model dependent quantity that allows to assign probabilities to different
hypotheses from the analysis of a same data set. To give some practical
examples, these methods are applied to two concrete cases. In the first
example, the presence or not of a satellite line in an atomic spectrum is
investigated. In the second example, we determine the most probable model among
a set of possible profiles from the analysis of a statistically poor spectrum.
We show also how to calculate the probability distribution of the main spectral
component without having to determine uniquely the spectrum modeling. For these
two studies, we implement the program Nested fit to calculate the different
probability distributions and other related quantities. Nested fit is a
Fortran90/Python code developed during the last years for analysis of atomic
spectra. As indicated by the name, it is based on the nested algorithm, which
is presented in details together with the program itself.
