In statistics , an expectation – maximization ( EM ) algorithm is an iterative method to find maximum a posteriori ( MAP ) estimates of parameters in statistical models , where the model depends on unobserved latent variables .