Let's talk about this matrix really quickly. This matrix represents a website for a business. I'll talk about what the numbers mean in the next paragraph, but first let's talk about the designed of the website. The site has a landing home page, a Frequently Asked Questions (FAQ) page, a product page (where it lists the for sale products), and then pages for the two products the business offers. Each product can only be purchased from the product page. Now what do the numbers mean?

Each row lists the connection probability between pages. So in row 0 (our first row) that's the rate of connection to each page coming from the outside internet. So that 0.4 in row 0, column 1 tells us that 40% of the time, people coming from the outside internet land on the home page (since it's ID 1). row 1 is our home page, so we see that in column 0 there's a 40% chance that someone on the home page leaves our website back to the internet at large. In column 2 of row 1, we see that there's a 15% chance that someone on our home page goes to the FAQ page. That's the logic that we have here. The reason the "purchase item 1" only can be connected to by "item 1 page" is that we only allow users to buy an item from one specific page. The "purchase" rows have no connections, because we're going to count that as an end point for now.

Also, let's be clear up front: I'm making these numbers up for the purposes of demonstrating the technique. It's almost certain that no website anywhere would do as well as I'm about to show you. That said, the technique is the same whether your website does this well or not.

Now let's write a function that simulates a user experience. The user will start off in the internet at large. We'll roll a dice to figure out what page they go to, based on the likelihoods that we know from our tracking of the website's analytics.

After the user lands on some page, we'll go to the row for that page, roll a dice to see where they go next. We'll repeat this until they leave the site or purchase something. If they purchase something, we'll return the amount of money we've gained. If they bounce, we'll return no monies.

In [47]:

cost_of_item_1=100cost_of_item_2=75defsimulate_user(CTR,debug=False):user_page=0# start in the internet at largewhileTrue:# stop if the user is purchasing or leavinguser_page=np.random.choice(possible_clicks,p=CTR[user_page])ifdebug:print(user_page)ifuser_pagein[0,6,7]:breakifuser_page==6:returncost_of_item_1elifuser_page==7:returncost_of_item_2else:return0simulate_user(CTR,debug=True)

4
0

Out[47]:

0

Now that we have that ability, let's see how much money we make if we have 10,000 users come in. We'll also track how we're getting our money by seeing how often people purchase each item and how often they bounce.

That was only one set of 10,000 users. To make sure we're getting a good idea of things (and that we are seeing a statistically relevant output), let's make that into a function and cycle through a bunch of user sets (note, for computational purposes, I'm going to turn it down to 1000 users per cycle)

Nice. Given the current design of our website, it looks like roughly 11% of people that come to our page buy something. Which means that our dollars/user is roughly $9.65/user. This would be a good time to re-acknowledge that I'm making these numbers up for the purposes of being demonstrative.

Now let's imagine you go to your marketing team, you hire an analyst that's going to optimize click-through-rate trends, do some A/B testing, and then update your page. Let's even imagine you get a pretty good analyst, and he manages to find some flaws in your FAQ page design. At the end of the day, he finds that he can update your page such that your bounce rate on your FAQ page drops by 10%, and is redistributed to the home page (8%) and your product page (2%). That sounds like a huge move, right?

A 10% retention gain is uncommonly large for a CTR analysis. But what impact does that have on the bottom line? Well, let's modify our CTR Matrix to account for that, then simulate this again.

To make a final decision on whether this matters or not, we'd need to do significantly more simulations. Right now, the margin of error is so wide, that we can't be 100% certain this is a real effect. For the sake of argument, let's say that the 2% increase is statistically significant... what conclusions can we draw?

We only see about a 2% overall increase in revenue despite seeing a 10% retention rate increase due to our Click-Through optimization. In this case, that 2% is very non-apparent by looking at the situation directly, since the click rates are hard to metnally capture. By using Monte Carlo, we were able to track what that increase did to our bottom-line directly.

A 2% increase in revenue isn't nothing, but it's a far cry from the 10% increase in CTR. If we had based our measured ROI on just the CTR, we'd have vastly over-estimated the impact on our business. Using MC, we were able to get down to brass tacks and see that the actual ROI is very different, and may not have been worthwhile, depending on cost to analyze and cost to maintain. Also remember that the 10% increase is HUGE for a CTR analysis. This is an example where we have a simple site, a miraculously large increase in CTR, and simple metrics - and even then, we're hard pressed to see a large, business friendly result.