Marginal distribution
In probability theory and statistics, the marginal distribution of a subset of a collection of random variables is the probability distribution of the variables contained in the subset. It gives the probabilities of various values of the variables in the subset without reference to the values of the other variables. This contrasts with a conditional distribution, which gives the probabilities contingent upon the values of the other variables.
Marginal variables are those variables in the subset of variables being retained. These concepts are "marginal" because they can be found by summing values in a table along rows or columns, and writing the sum in the margins of the table. The distribution of the marginal variables is obtained by marginalizing – that is, focusing on the sums in the margin – over the distribution of the variables being discarded, and the discarded variables are said to have been marginalized out.
The context here is that the theoretical studies being undertaken, or the data analysis being done, involves a wider set of random variables but that attention is being limited to a reduced number of those variables. In many applications, an analysis may start with a given collection of random variables, then first extend the set by defining new ones and finally reduce the number by placing interest in the marginal distribution of a subset. Several different analyses may be done, each treating a different subset of variables as the marginal variables.
Definition
Marginal probability mass function
Given a known joint distribution of two discrete random variables, say, X and Y, the marginal distribution of either variable--X for example--is the probability distribution of X when the values of Y are not taken into consideration. This can be calculated by summing the joint probability distribution over all values of Y. Naturally, the converse is also true: the marginal distribution can be obtained for Y by summing over the separate values of X., and
A marginal probability can always be written as an expected value:
Intuitively, the marginal probability of X is computed by examining the conditional probability of X given a particular value of Y, and then averaging this conditional probability over the distribution of all values of Y.
This follows from the definition of expected value
Therefore, marginalization provides the rule for the transformation of the probability distribution of a random variable Y and another random variable X = g:
Marginal probability density function
Given two continuous random variables X and Y whose joint distribution is known, then the marginal probability density function can be obtained by integrating the joint probability distribution,, over Y, and vice versa. That isand
where, and.
Marginal cumulative distribution function
Finding the marginal cumulative distribution function from the joint cumulative distribution function is easy. Recall thatfor discrete random variables,
for continuous random variables,
If X and Y jointly take values on × then
and
If d is ∞, then this becomes a limit . Likewise for.
Marginal distribution vs. conditional distribution
Definition
The marginal probability is the probability of a single event occurring, independent of other events. A conditional probability, on the other hand, is the probability that an event occurs given that another specific event has already occurred. This means that the calculation for one variable is dependent on another variable.The conditional distribution of a variable given another variable is the joint distribution of both variables divided by the marginal distribution of the other variable. That is,
for discrete random variables,
for continuous random variables.
Example
Suppose there is data from classroom of 200 students on the amount of time studied and the percent correct. Assuming that X and Y are discrete random variables, the joint distribution of X and Y can be described by listing all the possible values of p, as shown in Table.3.The marginal distribution can be used to determine how many students that scored 20 or below:, meaning 10 students or 5%.
The conditional distribution can be used to determine the probability that a student scored 20 or below while also studying for 60 minutes or more:, meaning there is about a 11% probability of scoring 20 after having studied for at least 60 minutes.
Real-world example
Suppose that the probability that a pedestrian will be hit by a car, while crossing the road at a pedestrian crossing, without paying attention to the traffic light, is to be computed. Let H be a discrete random variable taking one value from. Let L be a discrete random variable taking one value from.Realistically, H will be dependent on L. That is, P will take different values depending on whether L is red, yellow or green. A person is, for example, far more likely to be hit by a car when trying to cross while the lights for perpendicular traffic are green than if they are red. In other words, for any given possible pair of values for H and L, one must consider the joint probability distribution of H and L to find the probability of that pair of events occurring together if the pedestrian ignores the state of the light.
However, in trying to calculate the marginal probability P, what is being sought is the probability that H = Hit in the situation in which the particular value of L is unknown and in which the pedestrian ignores the state of the light. In general, a pedestrian can be hit if the lights are red OR if the lights are yellow OR if the lights are green. So, the answer for the marginal probability can be found by summing P for all possible values of L, with each value of L weighted by its probability of occurring.
Here is a table showing the conditional probabilities of being hit, depending on the state of the lights.
Red | Yellow | Green | |
Not Hit | 0.99 | 0.9 | 0.2 |
Hit | 0.01 | 0.1 | 0.8 |
To find the joint probability distribution, more data is required. For example, suppose P = 0.2, P = 0.1, and P = 0.7. Multiplying each column in the conditional distribution by the probability of that column occurring results in the joint probability distribution of H and L, given in the central 2×3 block of entries..
Red | Yellow | Green | Marginal probability P | |
Not Hit | 0.198 | 0.09 | 0.14 | 0.428 |
Hit | 0.002 | 0.01 | 0.56 | 0.572 |
Total | 0.2 | 0.1 | 0.7 | 1 |
The marginal probability P is the sum 0.572 along the H = Hit row of this joint distribution table, as this is the probability of being hit when the lights are red OR yellow OR green. Similarly, the marginal probability that P is the sum along the H = Not Hit row.
Multivariate distributions
For multivariate distributions, formulae similar to those above apply with the symbols X and/or Y being interpreted as vectors. In particular, each summation or integration would be over all variables except those contained in X.That means, If X1,X2,...,Xn are discrete random variables, then the marginal probability mass function should be
if X1,X2,...Xn are continuous random variables, then the marginal probability density function should be