Given a description of the stacking statistics of layered close-packed structures in the form of a hidden Markov model, analytical expressions are developed for the pairwise correlation functions between the layers. These may be calculated analytically as explicit functions of model parameters or the expressions may be used as a fast, accurate and efficient way to obtain numerical values. Several examples are presented, finding agreement with previous work as well as deriving new relations.