Assume I have a some mixture distribution, $H$, with mean $\mu$ and variance $\sigma^2$. $H$ is a mixture of $n$ component distributions where all component weights are equal. Let $\mu_i$ be the mean of component distribution $H_i$ and $\sigma^2_i$ the variance of component distribution $H_i$.

Let $X$ be a random variable drawn from $H$. We then know that:

$$\text{E}[X]=\mu=\sum_{i=1}^n\frac{1}{n}\mu_i$$ and $$\text{E}[(X-\mu)^2]=\sigma^2=\sum_{i=1}^n[\frac{1}{n}(\mu_i^2+\sigma^2_i)]-\mu^2$$

Given the parameters $\mu$ and $\sigma^2$, is there a way to randomly sample a set of $\mu_i$ and $\sigma_i^2$ for each of the $n$ component distributions such that the above two constraints are met?

Sampling a set of means such that the first constraint is met is trivial, however, how to simultaneously sample the means and variances of all components to meet both constraints is not obvious to me.

  • 1
    $\begingroup$ I'm not following this question because the two formulas you give don't say anything about any particular sample: they are both properties of $H$ alone. Could you therefore clarify what you mean by "the above two constraints are met"? (If perhaps you want the arithmetic mean and variance of the numbers in the sample to equal predetermined values, that can be done in myriad ways--you would need to stipulate many more properties of the intended sample for this question to be answerable in that case.) $\endgroup$
    – whuber
    Commented Nov 30, 2018 at 21:27
  • $\begingroup$ I want to break $H$ into $n$ component distributions. I want to specify each of the component distributions using using two parameters, mean and variance. In order for $H$ to be a "valid" mixture distribution, those two properties should hold. I think this is what you are suggesting by arithmetic mean and variance. Ideally, the parameters could be drawn from a Dirichlet distribution and then scaled as needed. This would allow me to control the amount of dispersion of the component means and variances. I'm trying to create a generative model for building a hierarchy/tree of mixtures. $\endgroup$
    – Collin
    Commented Nov 30, 2018 at 21:53

1 Answer 1


You may want to look at this paper: https://arxiv.org/abs/1601.01178 which tries to do something similar to what you are doing, by reparameterizing the mixture model by having a single mean and variance for the whole mixture and then sampling parameters of individual mixture components with respect to global mean and variance. That essentially puts the same constraints on the parameters as you want.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.