So to clarify your question:
- Do you consider only Gaussian distributions in your mixture model?
- Do you want to create a mixture distribution that you can sample from? Or are you only trying to plot the PDF of the mixture distribution?
For the sampling part, the first link you provided seems to give the idea: first sample the index of the sub-distribution in the mixture (with the choice method), then sample your data from this sub-distribution.
Regarding the limits of a given distribution, it seems that it is not straightforward to do in Python. Scipy provides a way to do it for some distributions (as mentioned in your second linked article). Otherwise, you can take a look at this question. Basically, you repeat sampling until you fall into your limits range.
In addition, the .rvs
method of the scipy.stats
distribution returns numpy arrays, so the libraries are supposed to be easy to combine. What do you mean by "crossover" in this case ?