# MixtureDistribution

MixtureDistribution[{w_{1},…,w_{n}},{dist_{1},…,dist_{n}}]

represents a mixture distribution whose CDF is given as a sum of the CDFs of the component distributions dist_{i}, each with weight w_{i}.

# Details

- The cumulative distribution function for value is proportional to , where is the CDF for dist
_{i}. - The distributions dist
_{i}need to be all continuous or all discrete, and have the same dimensionality. - The weights w
_{i}can be any non-negative real numbers. - MixtureDistribution can be used with such functions as Mean, CDF, and RandomVariate, etc.

# Examples

open allclose all## Basic Examples (3)

## Scope (30)

### Basic Uses (10)

A mixture with numeric weights:

Cumulative distribution function:

A mixture with symbolic weights:

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:

Plot a density function for different weights:

Two multivariate discrete distributions:

Several univariate continuous distributions:

### Parametric Distributions (5)

Define a mixture of two different continuous distributions:

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:

Cumulative distribution function:

Moments can be obtained numerically:

Define a mixture of two different multivariate discrete distributions:

Define a mixture distribution of multivariate uniform distributions:

### Nonparametric Distributions (3)

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:

### Derived Distributions (10)

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:

Define a mixture distribution of a MarginalDistribution:

Define a mixture with a CensoredDistribution:

A mixture with a ParameterMixtureDistribution:

PDFs of scaled mixture components and mixture distribution:

Define a mixture distribution with a CopulaDistribution:

Mixture of compatible QuantityDistribution evaluates to QuantityDistribution:

Plot the PDF:

## Applications (7)

Find the percentage of values 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 a 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 selected years 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:

Gaussian mixture model is commonly used for the purpose of image segmentation. Image is represented as an array of pixels. A pixel is a scalar (or vector) which shows the intensity (or color):

Visualize the distribution of pixel values via Histogram:

Fit the pixel values to a three-component Gaussian mixture with EstimatedDistribution:

Label each pixel with maximum a posterior probability (MAP) estimate:

## Properties & Relations (8)

A mixture with weights w is equivalent to one with weights w/Total[w]:

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 ParameterMixtureDistribution with a discrete weight, assuming a finite number of values, can be represented as a mixture distribution:

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:

A KernelMixtureDistribution is a MixtureDistribution derived from data:

#### Text

Wolfram Research (2010), MixtureDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/MixtureDistribution.html (updated 2016).

#### BibTeX

#### BibLaTeX

#### CMS

Wolfram Language. 2010. "MixtureDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/MixtureDistribution.html.

#### APA

Wolfram Language. (2010). MixtureDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MixtureDistribution.html