Code is based on work done by Pfeifer & Carraway (2000) with paper title 'Modeling Customer Relationships as Markov Chains'