MarginalDistribution
MarginalDistribution[dist,k]
represents a univariate marginal distribution of the k coordinate from the multivariate distribution dist.
MarginalDistribution[dist,{k1,k2,…}]
represents a multivariate marginal distribution of the {k1,k2,…} coordinates.
Details
- The distribution dist can be either a discrete or continuous multivariate distribution.
- For a discrete multivariate distribution dist with PDF , the PDF of MarginalDistribution[dist,{k1,…,km}] is given by where ξ={xk1,…,xkm}.
- For a continuous multivariate distribution dist with PDF , the PDF of MarginalDistribution[dist,{k1,…,km}] is given by where ξ={xk1 ,…,xk m }.
- MarginalDistribution can be used with such functions as Mean, CDF, and RandomVariate, etc.
Examples
open allclose allBasic Examples (3)
Scope (34)
Basic Uses (8)
Find the second univariate marginal distribution:
Multivariate marginals depend on the coordinate order given:
Univariate marginals behave as univariate distributions:
Multivariate marginals behave like a multivariate distribution:
Special moments are computed for each univariate marginal distribution:
Compare moments of marginal distributions with the moment of original distribution:
A general multivariate moment cannot typically be found from marginal moments:
Quantile functions can be computed for univariate marginal distributions:
Generate random variates from MarginalDistribution:
Compare the histogram to the plot of the PDF of the marginal distribution:
Estimate distribution parameters:
Define a trivariate probability distribution:
Find the covariance matrix of :
The variances of the marginals form the diagonal of the covariance matrix of :
Parametric Distributions (2)
The marginal distributions of many multivariate parametric distributions automatically simplify:
The univariate marginals follow BetaDistribution:
The multivariate marginals follow DirichletDistribution:
In some cases, marginal distributions will not automatically simplify:
Univariate marginals simplify to a BinomialDistribution:
The multivariate marginals do not simplify:
The resulting marginal can still be used like any other distribution:
Nonparametric Distributions (3)
Find marginals of an EmpiricalDistribution:
Cumulative distribution function of the marginal distributions:
Find marginals for a SmoothKernelDistribution:
Find marginals of a HistogramDistribution:
Derived Distributions (9)
Find the marginal distribution of a MarginalDistribution:
The second marginal of is the third marginal of :
Find marginals of a CopulaDistribution:
Find marginals of a TruncatedDistribution:
Find marginals of a MixtureDistribution:
Each marginal distribution is the mixture of marginals:
Compare with the marginal distributions of the components:
Marginals of a MixtureDistribution are mixtures of marginals:
Plot a probability density function for both marginals:
Create a bivariate distribution using marginal distributions:
Compare a PDF of the original distribution with the ProductDistribution of marginals:
Find marginal distributions of a TransformedDistribution:
Find marginal distributions of a ParameterMixtureDistribution:
Visualize the probability density function:
Find marginal distributions of an OrderDistribution:
Marginals of a QuantityDistribution give QuantityDistribution:
Automatic Simplifications (12)
Discrete Parametric Distributions (3)
Marginals of multivariate DiscreteUniformDistribution again follow a uniform distribution:
Univariate marginals of MultivariatePoissonDistribution follow PoissonDistribution:
Multivariate marginals again follow multivariate Poisson distribution:
Univariate marginals of MultinomialDistribution follow BinomialDistribution:
Continuous Parametric Distributions (6)
Marginals of BinormalDistribution follow NormalDistribution:
All univariate marginals of MultinormalDistribution follow NormalDistribution:
Multivariate marginals of MultinormalDistribution are multivariate normal:
Marginals of multivariate UniformDistribution follow uniform distribution:
One-dimensional marginals of DirichletDistribution follow BetaDistribution:
Multivariate marginals of DirichletDistribution again follow Dirichlet distribution:
Univariate marginals of MultivariateTDistribution follow StudentTDistribution:
Univariate marginals of LogMultinormalDistribution follow LogNormalDistribution:
Multivariate marginals of LogMultinormalDistribution again follow log-multinormal distribution:
Derived Distributions (3)
Marginals of ProductDistribution are the component distributions:
A two-dimensional marginal is also defined by ProductDistribution:
Univariate marginals of a CopulaDistribution are the marginals used in the specification:
Marginal distributions of a MixtureDistribution are the mixtures of component marginals:
Applications (5)
Visualize univariate marginal distributions together with a bivariate distribution:
Plot the univariate marginals:
The city-highway mileage for a midsize car is given by a binormal distribution. Find the city mileage distribution:
Plot the probability density function:
Find the average city mileage:
The male weight and height follow a binormal distribution. Find the height distribution:
Find the median height for males:
Express the height distribution in meters:
A fair coin is flipped three times with the objective of getting three tails. Find the join distribution of the number of failures in the form of getting a head on the second or on the third flip:
Find the average number of failures of each kind:
Find the total number of failures of both kinds:
Simulate the number of failures by getting a head on the second or on the third flip:
A university campus lies completely within twin cities and . On a day there are on average 10 car accidents on campus and the joint distribution of the number of accidents per day in both cities is:
Find the distribution of the number of accidents in each city:
Compare probability density functions:
Simulate the number of accidents per day in city for 30 days:
Properties & Relations (5)
Use a marginal distribution if an event does not depend on all the variables:
Calculate the event probability:
Find expectations if the function does not involve all the variables:
An -variable multivariate distribution has proper marginal distributions:
Obtain the marginal CDF by taking limits of complementary variables:
Obtain the marginal PDF by integrating over complementary variables:
Multivariate marginal distributions preserve the correlation between components:
Find the marginal distribution for the first and the third components:
The covariance of the marginal is a submatrix :
Define the marginal for the second and the third components:
Text
Wolfram Research (2010), MarginalDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/MarginalDistribution.html (updated 2016).
CMS
Wolfram Language. 2010. "MarginalDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/MarginalDistribution.html.
APA
Wolfram Language. (2010). MarginalDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MarginalDistribution.html