 Approximate entropy, APN, and sample entropy, SAMPEN, are two algorithms for measuring the regularity of time series data. Both algorithms are based on the idea of chaotic behavior, which can be described mathematically using concepts from information theory. The main difference between APN and SAMPEN is that APN measures the complexity of a given signal, while SAMPEN measures the predictability of a given signal. These algorithms have been applied in various fields including medicine, telecommunications, economics, and earth science. This paper provides a detailed explanation of the underlying theory and practical application of these algorithms. It also includes source code for computing the algorithms and a step-by-step example of how to apply them. This article was authored by Alfonso Delgado Bono and Alexander Marschak.