Visitor's probability to purchase on eCommerce site, based on aggregate historic data On an eCommerce website we want to create some personalization for visitors who are more likely to make a purchase.

Let's assume we only have one single item for sale.

The likelihood should be based on data that we have, for example:


Price of the item when the customer visited (it may vary)
Average customer reviews rating of the item
If a discount coupon was offered or not 
If certain words were present in the item title or description
etc.


Our plan is to create a DB that will contain each visitor's visit data (the above data), and indication if eventually he made a purchase or not.

Once we have at least a few purchases, we need to somehow look for a pattern among all these cases, and based on this pattern we can later forecast the likelihood.

For example, if at least in 50% of the cases that the item was purchased, its price was no more than $100, than we will make personalization only on cases where the item is being sold at a max price of $100.

Does this make sense? 

How should we do it technically? From both DB structure concerns, and website speed concern - 

Should we collect each variable in its own DB column, or is it better to create some kind of long string in the browser session like p:99-r:4,  (which means: price $99, rating: 4) and then later break this data down using another script?

Is there some kind of library that can analyze this data and show it maybe in graph, like some fancy fronted, or does this project need to be made from scratch?

What kind of technical skills does the person who do it need to have? Is this related to machine-learning?
This is a big topic known as Recommender Systems or Recommendation Engines.

The most common method is use what is known as collaborative filtering. Most methods on the internet try to guess what the user will rank an item, but I think this can be extended to if the user will make a purchase or not, given that if a user were to rank something highly they would also be more likely to buy that item.

The idea is that each item has a n-dimensional vector, and each user has an n-dimensional vector. You can predict a user's predicted rating by some operation between the two vectors. In this example lets use the dot product between the two vectors as a means to predict the user's rating for an item they haven't yet seen.

While taking the 2 vectors and getting a prediction is not a machine learning problem, finding suitable values for the vectors is most definitely a machine learning problem. I won't get too deep into how you can get these vectors because many different algorithms apply and it seems that you are asking more of a system design question.

Once you have trained 1 vector for each user and 1 vector for each item, you have 2 more problems to solve:
1. Estimate the top N candidate items to recommend
2. Take the dot product between each of these N items and recommend the few with the highest score.

Number 1 will likely involve some use of spatial indexing in your database (example PostGIS for PSQL) so you can find some vectors that would give reasonably good dot-products. You may want to consider using a ball tree data structure to search for a good set of candidate items.

Number 2 will be pretty simple by just dotting the vectors and picking the best few.

It will be a big challenge for you to undertake but I'm certain you'll learn a lot. Since it was such a big system you want to create I wasn't able to go into detail but hopefully, I pointed you in the right direction.