In this project, I use Object Orientated Python to build a program that simulates customer behaviour in a supermarket which models the movements for each customer between various food sections in a store.

A Markov Chain describes a Stochastic process where each state depends only on the previous one. Each transition in a Markov Chain happens with a transition probability that is conditional on the present state. These probabilities can be written as a transition probability matrix P. Long term dependencies exist in Markov Chains, but they are fully encoded in the transition probabilities. If you know the current state, thatâ€™s enough. Knowing the past states does not provide additional information.

The sales department is interested in a summary of the collected data. I generate a report including numbers and diagrams. We are interested in the following:

- Calculate the total number of customers in each section
- Calculate the total number of customers in each section over time
- Display the number of customers at checkout over time
- Calculate the time each customer spent in the market
- Calculate the total number of customers in the supermarket over time

The project involves the following tasks:

- explore the data (includes pandas wrangling)
- calculate transition probabilities (a 5x5 matrix
- implement a customer class using OO programming
- run a MCMC simulation for a single customer
- extend the simulation to multiple customers

Lets get in touch and talk about your next project.

>