public void MixtureFitTest()
        {
            var samples1 = new NormalDistribution(mean: -2, stdDev: 0.5).Generate(100000);
            var samples2 = new NormalDistribution(mean: +4, stdDev: 0.5).Generate(100000);

            // Mix the samples from both distributions
            var samples = samples1.Concatenate(samples2);

            // Create a new mixture distribution with two Normal components
            var mixture = new Mixture<NormalDistribution>(new[] { 0.2, 0.8 },
                new NormalDistribution(-1),
                new NormalDistribution(+1));

            // Estimate the distribution
            mixture.Fit(samples, new MixtureOptions
            {
                Iterations = 50,
                Threshold = 0
            });

            var result = mixture.ToString("N2", System.Globalization.CultureInfo.InvariantCulture);

            Assert.AreEqual("Mixture(x; 0.50*N(x; μ = -2.00, σ² = 0.25) + 0.50*N(x; μ = 4.00, σ² = 0.25))", result);
        }