This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

MixtureDistribution

MixtureDistribution
represents a mixture distribution whose CDF is given as a sum of the CDFs of the component distributions , each with weight .
  • The cumulative distribution function for value is proportional to , where is the CDF for .
  • The distributions need to be all continuous or all discrete, and have the same dimensionality.
  • The weights can be any non-negative real numbers.
Define a mixture of two continuous distributions:
Define a mixture of two discrete distributions:
Define a multivariate mixture:
Define a mixture of two continuous distributions:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
Define a mixture of two discrete distributions:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
Define a multivariate mixture:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
A mixture with numeric weights:
Cumulative distribution function:
A mixture with symbolic weights:
Probability density function:
The weights control the contribution by each distribution:
Two univariate continuous distributions:
The mixture combines the densities according to their weights:
Two bivariate continuous distributions:
The mixture combines the densities according to their weights:
Two univariate discrete distributions:
Probability density function:
Plot a density function for different weights:
Mean and variance:
Two multivariate discrete distributions:
Probability density function:
Generate random numbers:
Several univariate continuous distributions:
Moments:
Factorial moments:
Central moments:
Cumulants:
Several univariate discrete distributions:
Generating functions:
Estimate weights in a mixture:
Define a mixture of two different continuous distributions:
Probability density function:
Hazard function:
In the limit the exponential distribution component dominates:
Define a mixture of two distributions with different supports:
Probability density function for a few values of the weight:
Define a mixture of two different univariate discrete distributions:
Probability density function:
Cumulative distribution function:
Moments can be obtained numerically:
Define a mixture of two different multivariate discrete distributions:
Probability density function:
Covariance:
Define a mixture distribution of multivariate uniform distributions:
Cumulative distribution function:
Define a mixture with SmoothKernelDistribution:
The mixture combines the densities according to their weights:
Define a mixture with EmpiricalDistribution:
The mixture combines the cumulative distribution functions according to their weights:
Plot the cumulative distribution function:
Define a mixture with HistogramDistribution:
The mixture combines the densities according to their weights:
Define a mixture distribution with components given by MixtureDistribution:
The PDF is piecewise continuous:
The mean is a convex combination of the means of the components:
Find which components cause the mean of the mixture to be indeterminate:
Find a mixture distribution of the OrderDistribution of the minimum and the maximum:
Compare the probability density functions:
The mean of the mixture distribution:
Compare to the average of the means of order distributions:
Find the mixture distribution of a TruncatedDistribution:
The probability density function is not continuous:
The mean can be computed explicitly:
Find the probability density function of the mixture distribution with a ProductDistribution:
Define a mixture distribution with a TransformedDistribution:
Probability density function:
Define a mixture distribution of a MarginalDistribution:
Characteristic function:
Define a mixture with a CensoredDistribution:
Probability density function:
PDFs of scaled mixture components and mixture distribution:
Define a mixture distribution with a CopulaDistribution:
One component mixture simplifies to the input distribution:
A mixture with zero weights will reduce the number of input distributions:
A mixture with one zero weight will return an empty mixture:
Find the percentage of values between and :
Between and :
Package it up as a function using NProbability:
Determine the maximal variance of a mixture:
The heights of females in the United States follow normal distribution with mean 64 inches and standard deviation of 2 inches, while the heights of males in the United States follow normal distribution with mean 70 inches and standard deviation of 2 inches. If the population ratio of males to females is 1.1, then the heights of the whole population have the following bimodal distribution:
Simulate the typical distribution of heights in a town of population 100:
Find the probability that a person is at least 73 inches tall:
A binary transmission is sent with 0 coded as a voltage signal and 1 as a voltage signal. 1 is sent with probability but the signal is corrupted by white noise. Find the PDF of the received signal:
Simulate transmission at the receiver for p=0.4 and v=1:
To distinguish between the two signals, the voltage difference must be bigger:
MixtureDistribution can be used to create multimodal models:
The magnitudes of earthquakes in the United States in the years 1935-1989 have two modes:
Find an estimated distribution from possible mixtures of two normal distributions:
Compare the histogram to the PDF of the estimated distribution:
Find the probability of an earthquake of magnitude 7 or higher:
Find the mean earthquake magnitude:
Simulate magnitudes of the next 30 earthquakes:
The average city and highway mileage for midsize cars follows a binormal distribution:
Show the distribution of city and highway mileage:
Assuming 65% of the driving is done in the city, the mileage follows a MixtureDistribution:
Find the average:
A mixture with weights w is equivalent to one with weights w/Total[w]:
Compare PDFs:
The PDF of a mixture is a convex combination of the PDF of its components:
The CDF of a mixture is a convex combination of the CDF of its components:
The moments of a mixture are a convex combination of the moments of its components:
A moment of general order:
A ParameterMixtureDistribution with a discrete weight, assuming a finite number of values, can be represented as a mixture distribution:
Compare PDFs:
A ParameterMixtureDistribution with a discrete weight, assuming a countable number of values, can be approximated by a mixture distribution:
Compare approximations for different quantiles as cut-offs:
Approximating a ParameterMixtureDistribution with a continuous weight by a mixture distribution:
Compare PDFs:
A mixture of two binormal distributions:
A variety of distributional shapes from Gaussian mixtures:
A multivariate Gaussian mixture:
New in 8