Correlation between products I have an idea of what I want to achieve, but have no clue what it is called in statistical analysis world, hence impossible to implement.
I have a database with unique order numbers, customer names, products etc. I would like to see the correlation between products within orders. I.e. if I pick product X, what is the likelihood that I will also choose a product Y. 
I would like to know what to research to help me with this.
 A: Such relationships are called association rules.
One of the widely used algorithms for deriving association rules is Apriori, which is implemented in both R and Python.
A: It's called conditional probability $P(Y|X)$, i.e. probability of picking Y given that a customer picked X. There are relationships such as this one: $P(Y\&X)=P(Y|X)P(X)$, i.e. the probability that you pick Y and X is equal to probability of picking X multiplied by probability of picking Y conditional on picking X etc.
A: Basically you're wondering if the event where an individual chooses product $X$ is independent of the event where they choose product $Y$, or if these events are positively correlated.  You can check this by testing the hypothesis $p_1 = p_0$ against the alternative $p_1 > p_0$, where $p_1$ is the probability of choosing product $Y$ given that you've chosen product $X$, and $p_0$ is the same probability given that you didn't choose product $X$.  If your sample sizes are large you can test this with the statistic
$$
z = \frac{\hat{p}_1 - \hat{p}_0}{ \sqrt{\frac{\hat{p} (1 - \hat{p})}{n_1} + \frac{\hat{p} (1 - \hat{p})}{n_0}} }
$$
where $\hat{p}_1$ is the proportion of individuals who purchased product $Y$ among those who purchased product $X$, $\hat{p}_0$ is the proportion among those who didn't purchase product $X$ ($n_1$ and $n_0$ are the respective sample sizes), and $\hat{p}$ is the overall proportion.  When $p_1 = p_0$ this approximately follows a standard normal distribution, which can be used for the calculation of $p$-values.  Do you know where to go from here?
