I've spent the morning teaching myself about Bayes's theorem, because I assumed that it was required to help me solve my problem. However, the answer I've ended up with is the same as I would have got if I had used my naive approach prior to understanding Bayes's rule.
I'll explain my problem:
Suppose there are four possible methods of purchasing some item, $A_1, A_2, A_3, A_4$. These methods have different levels of attractiveness to customers. Over the previous month, for example, 14,456 people have used one of the methods. Thus, knowing how many people used each of the methods, one can clearly see the probabilities that customer has used one of the methods:
- $A_1 = 1500 / 14456 = 0.103$
- $A_2 = 11000 / 14456 = 0.76$
- $A_3 = 56 / 14456 = 0.0038$
- $A_4 = 1900 / 14456 = 0.131$
Customers are pretty fickle though, and most of the time they don't go through with the purchase. In fact, the number of customers who actually convert are pretty low. It's dependent also on the different method that they are using to make the purchase (imagine some methods are easier than others). In Bayesian language, I'm talking about the probability of a conversion given the method as $P(B | A_k)$. Using our example past month, we also know these probabilities, because we can see the number of conversions for each of the methods. There were varying conversion numbers for customers using each method.
- $P(B|A_1) = (76/1500) * A_1 = 0.0051$
- $P(B|A_2) = (24/11000) * A_2 = 0.0015$
- $P(B|A_3) = (10/56) * A_3 = 0.00065$
- $P(B|A_4) = (34/1900) * A_4 = 0.0022$
Now, let's suppose that sometimes the method we use to track the methods of purchase, and the number of conversions therein is a bit clunky and doesn't always work. Suppose a 145th conversion is in the system, but we don't know which method was used to make the purchase; we want to estimate this using the available data.
Bayes' theorem tells me I need to calculate:
- $P(A_1 | B) = 0.5277$
- $P(A_2 | B) = 0.1666$
- $P(A_3 | B) = 0.0694$
- $P(A_4 | B) = 0.2361$
Great! So I now know that there was just over a 52% chance that the 145th customer purchased using method 1.
However, this involved quite a bit of maths in making the $P(A_k | B)$ calculations. When I looked at the numbers that I got out I realised that if I had just divided the number of conversions for each channel by the total number of conversions, I got exactly the same answers.
76 / 144 = 0.527
24 / 144 = 0.166
10 / 144 = 0.069
34 / 144 = 0.236
I guess I'm a bit surprised that I didn't need to go to all the effort with the Bayes's Rule stuff, so I don't quite understand situations where I'll need to use the rule, and not just do other summary calculations.