  This handbook chapter gives a modern introduction to spectral analysis of
celestial X-ray sources. Concepts presented include the instrumentation
response, the linear modelling approximation, Poisson count statistics and the
Gaussian approximation, data re-binning, visualisation techniques, handling
backgrounds, Bayesian and frequentist viewpoints, uncertainty quantification of
model parameters, model checking, model comparison, and inferring population
distributions. Realistic hands-on example exercises with accompanying data
files and code are included to apply the theoretical concepts in practice.
