Suppose I have a dataset that is derived from a random sampling from a mixture distribution
data = RandomVariate[MixtureDistribution[{.5, .5}, {NormalDistribution[600, 100], NormalDistribution[1000, 100]}], 10000];
Show[Histogram[data, {0, 5000, 10}, "PDF", PlotRange -> {{0, 2000}, {0, .003}}],
Plot[{.5 PDF[NormalDistribution[600, 100]][x],.5 PDF[NormalDistribution[1000, 100]][x]}, {x, 0, 2000},
PlotRange -> {{0, 2000}, {0, .003}}]]
I'd like to partition the binned data
into two separate sets respective to the two PDFs, lets say subdata1
and subdata2
so that when I run
Histogram[{subdata1,subdata2},{0,5000,10}]
I can obtain two separate normal distributions. The nature of my real data is such that it doesn't matter which distribution the overlapping region goes to, so long as those shared bins are partitioned proportionally to each PDF.
Edit 1: Changed wording from "independent" to the more correct "separate".
Classify
, etc.). However, you just have a sample from a mixture distribution with no known assignments. The answer I give below extracts the estimates of the parameters of the two distributions (assuming the individual distributions are Gaussian). $\endgroup$