# Does event A predict event B?

I'm want to show that a customer who buys paper books is more likely to buy an e-reader than a customer who does not buy paper books. Note that the number of e-readers purchased in the past is small (1,000) compared to the total set of events (1,000,000).

Here's the historical data that I have:

Customer Name
| Month
| Purchased Books in Last Month
| Purchased Books in Last 12 Months
| Purchased Books in Last 3 Years
| Purchased Book this Month
Joe Smith | 1/12 | 0 | 0 | 0 | 1 | 0
Joe Smith | 2/12 | 1 | 1 | 1 | 0 | 0
Joe Smith | 3/12 | 0 | 1 | 1 | 0 | 1
...


Using these historical data, I'd like to demonstrate that book-buyers are more likely to buy e-readers, especially if they have recently purchased a book.

1. When I do a linear regression on the binary events for "Purchased Books in Last 12 Months" and "Purchased e-Reader this Month", I get r < 0.1.

How do I reconcile these two results? Am I using the right tools to answer this question with confidence?

• What do you mean by "r<0.1"? Is this a typo (ie, p<.1)? Is it a correlation coefficient? Is it logistic regression coefficient? What tools have you used to try to answer this question? In #2, did you simple compare the probabilities (eg, .9 is 10x .09)? – gung Aug 3 '13 at 14:42

There's a couple issues here:

1) By combining the data across time you are losing power and also losing the temporality of the events: Did they purchase the books before or after they purchased the e-reader? It's not completely clear to me whether you have made this error.

2) If you do combine the events over time, and the event you are trying to model is "purchased an e-reader" then you want to use logistic regression, not linear regression.

3) I see no reason to dichotomize "purchased books" in last 12 months. Surely some people purchased 1 book and others purchased many. That ought to make a difference.

4) An even better tool for this analysis might be survival analysis, with "time to purchasing an e-reader" as the dependent variable and "books purchased" as the independent variable. Survival analysis allows for time-varying covariates (such as number of books purchased).

5) Finally, you probably should include other independent variables, if you have them. Things like sex, age, income.... These will matter and will help your analysis.