> For the complete documentation index, see [llms.txt](https://ai.nuhil.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai.nuhil.net/probability/marginal-probability.md).

# Marginal Probability

We may be interested in the probability of an event for one random variable, irrespective of the outcome of another random variable. There is no special notation for marginal probability; it is just the sum or union over all the probabilities of all events for the second variable for a given fixed event for the first variable.

$$
P(X=A) = \sum\_{i=1}^n P(X=A,Y=y\_i) = \sum\_{y} P(X,Y)
$$
