This is the problem I am trying to solve: I am looking at user behavior for an online newspaper. I have a behavior period and then I look at the users who bought a subscription within two weeks after the behavior period.
I am trying to find out if the number of distinct categories a user have visited in the behavior period has an effect on the probability of buying a subscription. There are approximately 25 different categories. As expected, we have already seen that there is a correlation between the number of page views (the number of articles an user have visited) and the probability of subscription purchase. In addition, the correlation between number of page views and number of distinct categories is 0.82.
The distributions of both page views and number of distinct categories are strongly decreasing as the values increase. That is, a large share of users have only one or a few page views and have seen just a few different categories.
My question is therefore, how I can find out if there is a relationship between number of distinct categories and the probability of subscription purchase. I remember something about marginalization from when I was a student, but it’s a long time ago. I hope someone is able to explain how I can go about for doing this for the example above.
I'm not sure if it is relevant, but I am mostly using R, but I am also comfortable using Python.