Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Let's say I have two variables $A$ and $B$ and I want to write the probability that $A=2$ conditional on $B=1$, which of the two ways would be correct:
$$P(A=2 | B=1) $$
$$ P(A=2 \cap B=1) $$
The conditional probability $P(A=2 \:|\: B=1)$ is the probability that $A=2$ given that $B=1$.
The joint probability $P(A=2 \cap B=1)$ is the probability that $A=2$ and $B=1$.
In general, these two expressions are related by
$$P(A=2 \cap B=1) = P(A=2 \:|\: B=1)P(B=1).$$
Required, but never shown