AddedDistribution
Model a weighted mixture of component distributions.
Declaration
classdef AddedDistribution < DistributionOverview
AddedDistribution implements a
mixture distribution
by combining component densities \(p_i(z)\) with nonnegative weights
\(\alpha_i\) that sum to one. The resulting density and cumulative
distribution are
\(p(z) = \sum_{i=1}^{N} \alpha_i p_i(z),\)
\(F(z) = \sum_{i=1}^{N} \alpha_i F_i(z),\)
and the stored total variance is the weighted sum
\(\mathrm{variance} = \sum_{i=1}^{N} \alpha_i \,
\mathrm{variance}_i.\) When scalings is supplied as a scalar, the
constructor interprets it as the first weight in a two-component
mixture and expands it to \([\alpha, 1-\alpha].\)
distribution = AddedDistribution(scalings=[0.2 0.8], distributions=[NormalDistribution(sigma=2.0); StudentTDistribution(nu=4.5, sigma=1.0)]);
Topics
- Compose distributions
AddedDistributionCreate a weighted mixture from two or more distributions.distributionsComponent distributions used in the mixture model.scalingsMixture weights \(\alpha_i\) for the component distributions.