# Probability of what product will be purchased in repeat orders

I have a problem I need to solve and am looking for assistance in what algorithm to use. I have a online store that I have say 10 products and I have all the order history for every order. What I am trying to find is if a customer orders product A what is the probability that they will order product A, Product B, Etc. for their second, third, etc. order. What algorithm would work best to find the probability of what product will be purchased in repeat orders? I would like to either use R or python but if it can be done with simple math and if statements that would be even better.

• You might take a look at the arules package in R. It's purpose is itemset mining and association rules – emilliman5 Apr 25 '17 at 17:56