# What's the difference between marginal distribution and conditional probability distribution?

My understanding of both starts with this model: which has two random variables whose individual distributions are shown in red and blue, and their join distribution shown in green.

I'm comfortable with the idea of using discrete math to take subsets of the tuples in the joint distribution, then using those subsets as the domain for various functions ( vis. functions that give probabilities and calculate statistics ).

Then, amongst those functions we have two kinds in particular that have names: the marginal distribution functions and conditional probability distribution functions.

My current understanding is that conditional probability distribution functions take a subset of tuples that range over both features of the tuple--x and y, say. You'll use conditional probability distribution functions to calculate probabilities given some subset of x and some subset of y.

Then, my current understanding of marginal distribution functions is that they do the same thing as conditional probability distribution functions, but lock one of the features down to a specific value.

Is that correct? I know I'm not using the standard set of jargon, but--I'm coming to statistics from pure math and computer science. So, forgive me while I try to connect one domain to another in my head.

Please note that this is not a completely original answer, parts of this are quoted directly from Statistics How To:

Marginal and conditional distributions can be found the same table. Marginal distributions are the totals for the probabilities. They are found in the margins (that’s why they are called “marginal”). The following table shows probabilities for rolling two dice. The total probabilities in the margins are the marginal distributions. A conditional distribution on this table would be a sub-population. In this case, the sub populations would be the different dice rolls. For example, you might want to know the probability of rolling a two. To summarize what this is trying to say, the main point is that conditional distributions have to deal with finding probabilities for particular subsets of the population being looked at. Given two jointly distributed random variables, they deal with finding the probability for one random variable given certain restrictions for the other random variable.

A marginal distribution, to put simply, is the distribution of one random variable without any sort of reference to the other random variable

Credits to StatisticsHowTo.com for their images and definitions