Finding category with maximum likelihood method Let's say that we had an information for men and women heights.
R code:
set.seed(1) 
Women=rnorm(80, mean=168, sd=6) 
Men=rnorm(120, mean=182, sd=7) 
par(mfrow=c(2,1)) 
hist(Men, xlim=c(150, 210), col="skyblue") 
hist(Women, xlim=c(150, 210), col="pink")

Unfortunately something happened and we lost the information who is women and who is men.
R code:
heights=c(Men, Women) 
par(mfrow=c(1,1)) 
hist(heights, col="gray70") 
rm(women, men) 

Could we somehow estimate women and men mean heights and standard deviation using maximum likelihood method?
We know that men and women heights are normally distributed.

What you are describing is a mixture of two Gaussians.
$$
f(x) = \pi \, \mathcal{N}(\mu_1, \sigma_1^2) + (1 - \pi) \, \mathcal{N}(\mu_2, \sigma_2^2)
$$
where $\pi \in (0, 1)$ is a mixing proportion. Notice that to find the means and standard deviations of both groups, you would need to know the group assignments. If you were to find group assignments, the best way would be by assigning the observations closest to the mean of each group to the cluster. This is a chicken and egg problem. The problem can be solved by using Expectation-Maximization algorithm that starts with assigning the groups randomly, given them calculates the parameters, then re-classifies the observations, and repeats till convergence. There are also other algorithms, but this is the most popular one. You may know it from $k$-means clustering, which is a special case of a Gaussian mixture.
