Market Basket Analysis - Interpretation of mirrored association rules I have performed Market Basket Analysis on sales data, that comes from non-sequential receipts. I've read into the meaning of the different metrics, but there is one thing I don't understand. When looking at the strongest association rules, I detect a lot of mirrored rules. For example:

I'm not sure how to interpret this. Looking at confidence, it seems that people are more likely to buy pie, and then buy a cup of coffee. But how is this determined? We're talking about the same products, and my assumption would be identical values for all metrics for both rules. How can it be calculated that pie is more likely to lead to coffee, and less so the other way around? The support and lift are equal and any kind of order is not maintained when analyzing the products on receipts.

The confidence for a rule $A \Rightarrow C$ with antecedent $A$ and consequent $C$ is the conditional probability $P(C|A)$ for a customer to purchase product $C$ given that they purchased product $A$. This is not a statement about whether the purchase for product $C$ is likely to occur after a purchase for product $A$ in time, but rather a statement about whether customers purchase these products together.
The confidence for the rule $C \Rightarrow A$ is related to the confidence for the mirror rule $A \Rightarrow C$ by Bayes theorem:
$$
P(C|A) = P(A|C) \frac{P(C)}{P(A)}
$$
So, the confidence for these two mirror rules is related by the ratio of the probability of purchase for products $A$ and $C$. The example that you provided suggests that purchases for coffee are about twice as likely as purchases for pie:
$$
\frac{P(\mathrm{Coffee}|\mathrm{Pie})}{P(\mathrm{Pie}|\mathrm{Coffee})} = \frac{P(\mathrm{Coffee})}{P(\mathrm{Pie})} = \frac{0.46}{0.24}
$$
The other metrics that you are measuring can be defined as follows:

*

*Antecedent support: $P(A)$

*Consequent support: $P(C)$

*Support: $P(A, C)$

*Confidence: $P(C|A)$

*Lift: $\frac{P(A, C)}{P(A)P(C)}$

*Leverage: $P(A, C) - P(A)P(C)$

*Conviction: $\frac{1 - P(C)}{1 - P(C|A)}$
Amongst these metrics, the Support, Lift, and Leverage are symmetric with respect to interchange of the two products $A \leftrightarrow C$, so we would expect those metrics to be the same for the rule and its mirror rule. On the other hand the Confidence and the Conviction are not symmetric with respect to interchange of the two products, so we would not expect those metrics to be the same for the rule and its mirror rule.
