In this recipe, we'll deal with website optimization. Often, it is necessary to try changes (or better, a single change) on a website to see the effect they will have. In a typical scenario of what's called an A/B test, two versions of the website will be compared systematically. An A/B test is conducted by showing versions A and B of a web page to a pre-determined number of users. Later, statistical significance or a confidence interval is calculated in order to quantify the differences in click-through rates, with the goal of deciding which of the two web page variants to keep.
Here, we'll look at website optimization from a reinforcement point of view, where for each view (or user loading the page), we choose the best version given the available data at the time when they load the website. After each piece of feedback (click or no click), we update the statistics. In comparison to A/B testing, this procedure can yield a more reliable outcome, and...