I want to plotting mixtures of two 1d Gaussian distributions with Julia. I am not sure what is the best way to do it. I am trying to use Distributions.jl
and in specific to both
- Define two Gaussians using
d1 = Normal(0.0, 1.0)
andd2 = Normal(1.0, 1.8)
- Define a mixture using
MixtureModel(Normal[ Normal(-2.0, 1.2), Normal(0.0, 1.0), Normal(3.0, 2.5)], [0.1, 0.6, 0.3])
Now, for the 1st attempt I do not know how to define the weights. My questions therefore is about how to proceed on to simply generate and draw samples of this mixture?
I would like to plot them and also use these samples in order to perform parameter estimation.