# conditional probability calculation in terms of number of events

In trying to compute a discrete probability of some event $E$, call it, $P(E)$, one typically takes $P(E) = n(E) / n(S)$, where $n(E)$ is the number in the event, and $n(S)$ is the number in the sample space. (I may be a bit loose with terminology here, but hopefully, everyone will understand what I'm trying to express!).

Anyhow, my question is how does $P(E) = n(E) / n(S)$ generalize to the case of a conditional probability, something like $P(E|F)$?

Thanks!

Using the definition of conditional probability, we see the following:

$$P(E|F) = \frac{P(E \cap F)}{P(F)}$$.

Using your notation, I assume $P(F)$ is something along the lines of $n(F)/n(S)$ and $P(E \cap F)$ is $n(E \cap F) / n(S)$. Putting this all together would give us: $P(E|F) = \frac{n(E \cap F) / n(S)}{n(F)/n(S)} = \frac{n(E \cap F)}{n(F)}$

Hope this is what you were looking for!

By the definition, conditional probability is

$$P(A|B)=\frac{P(A, B)}{P(B)}$$

and in terms of counts this translates to

$$P(A|B)=\frac{n(A \cap B)}{n(B)}$$

so you divide counts of $A$ and $B$ appearing together, by the counts of $B$.

Yes, it does. The key is that the conditional probability changes the sample space. So $P(A|B)=\frac{n(A)}{n(S)}$, where $S$ is actually $B$, and $n(A)$ is really the number of values from within $B$ that are $A$.

More formally, as stated in one of the other answers, $$P(A|B)=\frac{P(A \cap B)}{P(B)}=\frac{n(A \cap B)}{n(B)}$$